Microsoft (R) F# 2.0 Interactive build 22.214.171.124 Copyright (c) Microsoft Corporation. All Rights Reserved. For help type #help;; > #r "FSharp.PowerPack";; --> Referenced 'C:\Program Files\FSharpPowerPack-126.96.36.199\bin\FSharp.PowerPack.dll' > open Microsoft.FSharp.Math;; > let euler_formula = complex 0.0 -Complex.pi.RealPart |> Complex.exp;; val euler_formula : Complex = -1r-1.22460635382238e-16iBut this also becomes inexact result of floating-point.
Tuesday, March 1, 2011
In last year, I wrote Euler's formula in F#. In this article, I used C# classes in System.Numerics namespace. At this time, i write again, with using F# PowerPack.