I have a simple temperature converter class that I am trying to work on.
open System
type Converter() =
member this.FtoC (f : float) = (5/9) * (f - 32.0)
member this.CtoF(c : float) = (9/5) * c + 32.0
let conv = Converter()
54.0 |> conv.FtoC |> printfn "54 F to C: %A"
32.0 |> conv.CtoF |> printfn "32 C to F: %A"
I am getting the following compile errors
prog.fs(4,46): error FS0001: The type 'float' does not match the type 'int'
prog.fs(4,39): error FS0043: The type 'float' does not match the type 'int'
What am I missing? What part of the code it is inferring as int ?