Add more constants
Opened this issue · 3 comments
Add a mathematical or physical constant with its corresponding test.
As long as you are adding new constants, here are some I didn't see and would like to:
--Artin's Constant https://oeis.org/A005596
--Base of the natural logarithm https://oeis.org/A081368
--Bernstein's Constant https://oeis.org/A073001
--Degree https://oeis.org/A072097
--Euler's Constant https://oeis.org/A002852
--Gelfond-Schneider Constant https://oeis.org/A078333
--Landau-Ramanujan Constant https://oeis.org/A064533
--Mandelbrot Set Area https://oeis.org/A098403
--Merten's Constant https://oeis.org/A077761
--Pi https://oeis.org/A000796
--Pythagora's Constant https://oeis.org/A322641
--Silver Ratio https://oeis.org/A014176
--Twin prime Constant https://oeis.org/A065645
--Zeta Function, Zeta(2) https://oeis.org/A013661
--i^i https://oeis.org/A049006
I've added the OEIS page for each. With those like Pi, Degree, 'e' etc., I may not have looked in the right place?
hi @hsmyers --- fwiw pi(π) and e(𝑒) are already built in terms in raku (https://docs.raku.org/language/terms) --- and there is some support for Degree over at Physics::Measure
#Angles use degrees/minutes/seconds or decimal radians
my $θ1 ♎️ <45°30′30″>; #45°30′30″ (using <> to deconfuse quotation marks)
my $θ2 ♎️ '2.141 radians'; #'2.141 radian'
#NB. The unit name 'rad' is reserved for the unit of radioactive Dose
# Trigonometric functions sin, cos and tan (and arc-x) handle Angles
my $sine = sin( $θ1 ); #0.7133523847299412
my $arcsin = asin( $sine, units => '°' ); #45°30′30″
#NB. Provide the units => '°' tag to tell asin you want degrees back