Skip to content

mwweissmann/ocaml-posix-math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POSIX math

This library provides access to the POSIX math functions, including complex numbers. posix-math links to the standard C-library or whatever provides the POSIX math library libm on your system. Calls to the OCaml functions then are handed over to your systems math library and returned to OCaml.

open Posix_math

let _ =
  Printf.printf "%f\n" (acosh 47.0)

To avoid shadowing functions from other libraries, it is a good idea to open the module only where required.

let _ =
  let z = Complex.zero in
  Printf.printf "%f\n" Posix_math.(cabs z)

The full interface is available in the API documentation.

The source code of time is available under the MIT license.

This library is originally written by Markus Weissmann