Math library

Introduction

As in Python, the math library is here to provide the basic utils and maths functions so you can make some mathematics using dromadaire.

You can import this library using :

> import math
##or
> from math import *
## (will come soon)

Variables

The math library doesn’t have a lot of variables yet, but there will be a lot more in some days.

Pi

You can get an approximation of the pi number using

> math.pi

Version

You can get the version of the library using :

> math.version

Functions

Trigonometry

  1. cosinus

You can get the cosinus of an angle (in radians) using :

> math.cos(angle)
  1. sinus

You can get the sinus of an angle (in radians) using :

> math.sin(angle)
  1. tangent

You can get the tangent of an angle (in radians) using :

> math.tan(angle)
  1. radians

You can convert an angle from degrees to radians using :

> math.radians(angle)
  1. Arc cosinus

You can get the arc cosinus (in radians) of a cosinus using :

> math.acos(angle)
  1. Arc sinus

You can get the arc sinus (in radians) of a sinus using :

> math.asin(angle)
  1. Arc tangent

You can get the arc tangent (in radians) of a tangent using :

> math.atan(angle)

Hyperbolic trigonometry

  1. Hyperbolic cosinus

You can get the hyperbolic cosinus of an angle (in radians) using :

> math.cosh(angle)
  1. Hyperbolic sinus

You can get the hyperbolic sinus of an angle (in radians) using :

> math.sinh(angle)
  1. Hyperbolic tangent

You can get the hyperbolic tangent of an angle (in radians) using :

> math.tanh(angle)
  1. Hyperbolic Arc cosinus

You can get the hyperbolic arc cosinus (in radians) of an hyperbolic cosinus using :

> math.acosh(angle)
  1. Hyperbolic Arc sinus

You can get the hyperbolic arc sinus (in radians) of an hyperbolic sinus using :

> math.asinh(angle)
  1. Hyperbolic Arc tangent

You can get the hyperbolic arc tangent (in radians) of an hyperbolic tangent using :

> math.atanh(angle)

Other arithmetical functions

  1. Absolute value

You can get the absolute value of a number using :

> math.abs(number)
  1. Decimal logarithm

You can get the decimal logarithm of a number using :

> math.log(number)
  1. Natural logarithm

You can get the natural logarithm of a number using :

> math.abs(number)
  1. Exponential

You can get the exponential of a number using :

> math.exp(number)
  1. Square root

You can get the square root of a number using :

> math.sqrt(number)
  1. Factorial

You can get the factorial of a number using :

> math.fac(number)
  1. Root

You can get the xth root of a number using :

> math.root(number,x)