mathnet/mathnet-symbolics

Approximation.Real vs FloatingPoint.Real

oluwandabira opened this issue · 0 comments

Trying to use this library from its documentation and I wrote this out:

#r "nuget: MathNet.Symbolics, 0.24.0"

open MathNet.Symbolics

open Operators

let x = symbol "x"

let y = symbol "y"

let xy = x * y

Evaluate.evaluate <| Map.ofList ["x", Real 2.0; "y", Real 5.0] <| xy

which I expect to work but the last line is invalid because Real evaluates to Approximation and not FloatingPoint, so I have to change the last line to

Evaluate.evaluate <| Map.ofList ["x", FloatingPoint.Real 2.0; "y", FloatingPoint.Real 5.0] <| xy

Am I doing something wrong that it infers the wrong Real?