mirror of
				https://github.com/aportelli/LatAnalyze.git
				synced 2025-10-31 06:44:32 +00:00 
			
		
		
		
	Infinity is now a math constant
This commit is contained in:
		| @@ -72,8 +72,9 @@ namespace MATH_NAMESPACE | ||||
|     DMat varToCorr(const DMat &var); | ||||
|      | ||||
|     // Constants | ||||
|     const double pi = 3.1415926535897932384626433832795028841970; | ||||
|     const double e  = 2.7182818284590452353602874713526624977572; | ||||
|     constexpr double pi  = 3.1415926535897932384626433832795028841970; | ||||
|     constexpr double e   = 2.7182818284590452353602874713526624977572; | ||||
|     constexpr double inf = std::numeric_limits<double>::infinity(); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -690,7 +690,7 @@ void MathInterpreter::compile(RunContext &context) | ||||
|         if (root_) | ||||
|         { | ||||
|             context.addVariable("pi",  Math::pi); | ||||
|             context.addVariable("inf", HUGE_VAL); | ||||
|             context.addVariable("inf", Math::inf); | ||||
|             ADD_STDMATH_FUNCS(context); | ||||
|             root_->compile(program_, context); | ||||
|             for (unsigned int i = 0; i < program_.size(); ++i) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user