math.nextafter

The math.nextafter function returns the real value closest to the number x in the direction of the number y. That is, this function returns the result of adding to the argument x the smallest possible increment in Python towards the number y.

If x is equal to y, the function returns x.

Submitted by admin on Sun, 01/24/2021 - 11:03

math.modf

The math.modf function returns the fractional part and the integer part of the number included as an argument.

Submitted by admin on Sun, 01/24/2021 - 10:40

math.lcm

The math.lcm (least common multiple) function returns the least common multiple of the integers included as arguments.

Submitted by admin on Sat, 01/23/2021 - 14:03

numpy.asarray

The numpy.asarray function converts a data structure to a NumPy array.

This function is similar to np.array (although with fewer options), the biggest difference being the fact that np.array generates -by default- an independent copy of the structure passed as an argument, whereas numpy.asarray does not.

Submitted by admin on Fri, 01/22/2021 - 14:32

math.isqrt

The math.isqrt (integer square root) function returns the integer part of the square root of the number passed as an argument.

Submitted by admin on Thu, 01/21/2021 - 20:29

math.isclose

The math.isclose function returns the Boolean True if the two numbers indicated as arguments are close enough, or False otherwise. The concept of "proximity" is given by the rel_tol and abs_tol parameters.

Submitted by admin on Wed, 01/20/2021 - 16:26

math.gcd

The math.gcd (Greatest Common Divisor) function returns the greatest common divisor of the integers included as arguments.

Submitted by admin on Wed, 01/20/2021 - 15:59

math.fsum

The math.fsum function returns the precise sum of the values of the iterable that it receives as an argument. Loss of precision is avoided by using multiple partial sums.

Submitted by admin on Wed, 01/20/2021 - 13:59