mathnet-symbolics icon indicating copy to clipboard operation
mathnet-symbolics copied to clipboard

Approximation.Real vs FloatingPoint.Real

Open oluwandabira opened this issue 4 years ago • 0 comments
trafficstars

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?

oluwandabira avatar Sep 16 '21 09:09 oluwandabira