Skip to content

Instantly share code, notes, and snippets.

@habib-sadullaev
Last active August 30, 2023 07:05
Show Gist options
  • Save habib-sadullaev/214dbe51bdfbe4e234efbd50c2ac7c3a to your computer and use it in GitHub Desktop.
Save habib-sadullaev/214dbe51bdfbe4e234efbd50c2ac7c3a to your computer and use it in GitHub Desktop.
open System.Numerics
module NumericLiteralG =
let inline FromZero () : #INumber<'a> = 'a.Zero
let inline FromOne () : #INumber<'a> = 'a.One
let inline FromInt32 (number: int) : #INumber<'a> = 'a.CreateChecked(number)
let (*) x y : #IMultiplyOperators<'a, 'a, 'a> = 'a.op_Multiply(x, y)
let (/) x y : #IDivisionOperators<'a, 'a, 'a> = 'a.op_Division(x, y)
let foo x = x / 1000G * 37G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment