src/pylib/Lib/math_impl/expm1_log1p

Search:
Group by:
Source   Edit  

Hint: result calculated at compile-time may a little differ those in runtime-time, e.g. For log1p: for i in 1..100, x = float(i), the following are results that differs each other:

x = 2.0

c_log1p(x) = 1.09861228866811 ct_log1p.log1p(x) = 1.09861228866811 relative_tol = -2.021137094636221e-16

x = 13.0

c_log1p(x) = 2.639057329615258 ct_log1p.log1p(x) = 2.639057329615259 relative_tol = 1.682756963505621e-16

x = 47.0

c_log1p(x) = 3.871201010907891 ct_log1p.log1p(x) = 3.871201010907891 relative_tol = -1.147161329516994e-16

x = 73.0

c_log1p(x) = 4.30406509320417 ct_log1p.log1p(x) = 4.304065093204169 relative_tol = -2.063580360581673e-16

Procs

func expm1[F: SomeFloat](x: F): F
Source   Edit  
func log1p[F: SomeFloat](x: F): F
Source   Edit