Changeset 15341 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FloatExpressions.cs
- Timestamp:
- 08/28/17 09:03:34 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FloatExpressions.cs
r15334 r15341 449 449 return interpreter.StringStack.IsEmpty || 450 450 interpreter.StringStack.Top.Length == 0 || 451 !double.TryParse(interpreter.StringStack.Top, out tmp); 451 !double.TryParse( 452 interpreter.StringStack.Top, 453 NumberStyles.AllowDecimalPoint | NumberStyles.Float, 454 CultureInfo.InvariantCulture, 455 out tmp); 452 456 } 453 457 454 458 public override void Eval(IInternalPushInterpreter interpreter) { 455 459 var str = interpreter.StringStack.Pop(); 456 var value = double.Parse(str, CultureInfo.InvariantCulture);460 var value = double.Parse(str, NumberStyles.AllowDecimalPoint | NumberStyles.Float, CultureInfo.InvariantCulture); 457 461 458 462 interpreter.FloatStack.Push(value);
Note: See TracChangeset
for help on using the changeset viewer.