Snippets tagged numerics

  • Generic number literal

    A generic numeral G. It allows writing functions for arbitrary numeric type. The transformation is an efficient one, because it is implemented explicitly for every type. It combines the type classes technique of FsControl ( and with numeric literals. But FsControl is removed to completely avoid unnecessary function calls.

    4 people like this

    Posted: 9 years ago by Daniel Fabian (@iceypoi)

  • Generic Numeric Type Conversions

    Function that converts numeric types using type inference. This is meant to complement the generic number literal G in helping to write generic numeric code. The implementation is similar to the generic number literal snippet. See

    1 people like this

    Posted: 8 years ago by Sami Perttu