package baguette_sharp

  1. Overview
  2. Docs

The Math Module of the B# STD

val argument_to_float : Parser.parameters -> float

Transforms a parameter into a float

val list_of_arguments_to_float : Parser.parameters list -> float list

Transforms a list of parameters into a list of floats

val arguments_to_float : Parser.parameters -> Parser.parameters -> float * float

Transforms a couple of arguments into a couple of floats

val fibo : int -> int

A O(n) in time and O(1) in space iterative fibbonacci function

Computes the sum of the list

Computes the multiplication of the list

val fibonacci : Parser.parameters list -> Parser.parameters

Gives the nth element of the fibbonacci sequence

Exponentiate a^b

Computes the square root of the input

val substract : Parser.parameters list -> Parser.parameters

Computes the substraction (a-b) of the first two numbers of the input list

Computes the division (a/b) with the first two elements of the list

val randint : Parser.parameters list -> Parser.parameters

Returns a random integer in a,b

Computes the logarithm of a in base b

val opposite : Parser.parameters list -> Parser.parameters

Returns the opposite of the input

Returns the floor of the input

Returns the ceil of the input

OCaml

Innovation. Community. Security.