This project is read-only.
Floating Point Arithmetic

Category:
Arithmetic
Description: This sample shows some basic floating point arithmetic
Code:
let SampleArithmetic2() =
let x = 10.0 + 12.0 - 3.0
let y = x * 2.0 + 1.0
let r1 = x/3.0
printfn "x = %g, y = %g, r1 = %g" x y r1


Execution Result:
x = 19, y = 39, r1 = 6.33333

Last edited Sep 14, 2011 at 3:22 AM by ttliu2000, version 1

Comments

No comments yet.