- Create new F# application on VS2010
- Check the references containing System.Numerics
open System
open System.Numerics
let euler_formula = Numerics.Complex.Exp(Numerics.Complex(0.0, -Math.PI))
printfn "%O" euler_formula
At last, launch the command prompt with F5:
(-1, -1.22460635382238E-16)It occurs by inexactness of floating-point.
No comments:
Post a Comment