In my version of F # (1.9.4.19 on Mono), both versions fail:
The member or object constructor 'BigInt' takes 0 argument(s) but is here given 1. The required signature is 'Math.BigInt()'.
I can use
let max = float n |> sqrt |> int64 |> Math.BigInt.of_int64
to get bigint or
let max = float n |> sqrt |> int64 |> Math.BigInt.FromInt64
to get Math.BigInt .
source share