How do you represent a fraction in F # without losing accuracy?

What is the best way to represent fractions in F #? Haskell and Racket have a convenient way of presenting odds. Is there a data type in F # to represent relationships?

+5
source share
1 answer

You can use F # Powerpack , which has BigRational(arbitrary precision rational numbers):

let r = (1N/2N) * (1N/3N) // 1/6
+10
source

All Articles