Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Constants that are included:

  1. Archimedes constant, also known as Pi.

  2. Euler's constant, also known as the natural number.

  3. Meissel-Mertens constant

  4. Khinchin's constant

  5. Glaisher-Kinkelin constant

  6. Euler-Mascheroni constant

In case you haven't already done so:

opam install merlin ocp-indent dune utop

Example usage in the terminal:

  1. Go to the Archimedes folder.

  2. Enter 'dune utop lib' which should bring you into the utop interface:

dune utop lib
  1. Once in utop, open the set of tools you need:
open Lib;;
  1. For a naive monte-carlo approximation to the Archimedes constant(aka pi) with n samples:
Archimedes.mc_pi 10;;
  1. For a Newton-Euler approximation to the Archimedes' constant:
Archimedes.newton_euler 20;;
  1. Finally, for Ramanujan's approximation to the Archimedes' constant:
Archimedes.ramanujan 10;;

About

An Ocaml library for fundamental mathematical constants.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages