What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-02 23:16:49
cpp nan value
What is NaN ? NaN, acronym for “Not a Number” is an exception which usually occurs in the caseswhen an expression results in a number that can’t be represented. For example square root of negative numbers. // C++ code to demonstrat... Add solution -
-
Python 2021-11-05 02:53:14
algorithms for calculating pi in python
from decimal import * #Sets decimal to 25 digits of precision getcontext().prec = 25 def factorial(n): if n<1: return 1 else: return n * factorial(n-1) def plouffBig(n): #http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2... Add solution -
CSS 2021-11-02 17:06:08
ptython math methods
math.acos() Returns the arc cosine of a number math.acosh() Returns the inverse hyperbolic cosine of a number math.asin() Returns the arc sine of a number math.asinh() Returns the inverse hyperbolic sine of a number math.atan() Returns the arc tangent of ... Add solution -
CSS 2021-10-05 11:10:05
ptython math constants
math.acos() Returns the arc cosine of a number math.acosh() Returns the inverse hyperbolic cosine of a number math.asin() Returns the arc sine of a number math.asinh() Returns the inverse hyperbolic sine of a number math.atan() Returns the arc tangent of ... Add solution -
Python 2021-09-24 12:41:04
high precision, decimal, float, mpmath
#!/usr/bin/python from decimal import Decimal, getcontext import math import mpmath getcontext().prec = 50 mpmath.mp.dps = 50 num = Decimal(1) / Decimal(7) num2 = mpmath.mpf(1) / mpmath.mpf(7) print(" math.sqrt: {0}".format(Decimal(math.s... Add solution -
Python 2021-09-04 01:38:02
python matrix algorithms
import numpy x = numpy.array([[1, 2], [4, 5]]) y = numpy.array([[7, 8], [9, 10]]) # using sqrt() to print the square root of matrix print ("The element wise square root is : ") print (numpy.sqrt(x)) # using sum() to print summation of... Add solution
Best helpers
C.B
+5
Beatriz LO
+5
Matt McGuire
+5
Stacey
+5
Dan Aloni
+5
Mostafa 36a2
+5
RiCo
+5
Binarus
+5
Srihari
+5
Khrustzh
+5
Styne666
+5
Siranush A
+5
Newby
+5
Youssef
+5
Ron Short
+5
Cat812
+5
Alkasm
+5
Alexvoda
+5