07-27-2019, 06:41 AM
In need of the Bernoulli Number using HP-12C ?
Here is an attempt to generate a Bernoulli Number constant using 12C
Without a Pi function this program use 355/113 which give out about
4 to 5 digits precision.
-------------------------------------------------
To run:
If you need to know B10 divide it by 2 is 5
5 [R/S] display 0.07576 [R/S] 5 [X<>Y] 66
Answer: B10 is 0.07576 or in fraction is 5/66
--------------------------------------------------
B12
12 ÷ 2 = 6
6 [R/S] display 0.25311 [R/S] 61 [X<>Y] 241
Answer:
B12 since 12 is divisible by 4 answer is Negative
-0.25311 in fraction is -61/241
--------------------------------------------------
Remark:
To find B(n) divide it by 2 and calculate.
This program do not give answer of the alternate negative value
such as B2 = 1/6 where B4 = -1/30
For B(n) that divisible by 4 answer is "Negative"
--------------------------------------------------
Program:
Formula use to calculate Bernoulli Number
B(n) = [2(2n)! ÷ ((2^2n) - 1)(Pi^2n)] [1 + (1/3^2n) + (1/5^2n) + ...]
Gamo
Here is an attempt to generate a Bernoulli Number constant using 12C
Without a Pi function this program use 355/113 which give out about
4 to 5 digits precision.
-------------------------------------------------
To run:
If you need to know B10 divide it by 2 is 5
5 [R/S] display 0.07576 [R/S] 5 [X<>Y] 66
Answer: B10 is 0.07576 or in fraction is 5/66
--------------------------------------------------
B12
12 ÷ 2 = 6
6 [R/S] display 0.25311 [R/S] 61 [X<>Y] 241
Answer:
B12 since 12 is divisible by 4 answer is Negative
-0.25311 in fraction is -61/241
--------------------------------------------------
Remark:
To find B(n) divide it by 2 and calculate.
This program do not give answer of the alternate negative value
such as B2 = 1/6 where B4 = -1/30
For B(n) that divisible by 4 answer is "Negative"
--------------------------------------------------
Program:
Code:
2
x
STO 2
355
ENTER
113
÷
STO 3
1
STO 0
STO 1
-----------------
RCL 0 // line 16
2 x 1 +
RCL 2
CHS
Y^X
RCL 1
+
RCL 1
X<>Y
X≤Y
GTO 34
STO 1
1
STO+0
GTO 16
RCL 2 // Line 34
n!
2 x
RCL 1
x 2
RCL 2
Y^X
1 -
RCL 2
RCL 3
X<>Y
Y^X
x ÷ // B(n) constant end here
----------------
R/S // Line 51
STO 0 // Decimal to Fraction start here
STO 1
0
STO 2
1
RCL 0
INTG // Line 58
RCL 2
x +
STO 2
RCL 0
x
. 5 // decimal and five // Line 66
+
INTG
STO 3
RCL 2
÷
RND
RCL 0
RND
- // Subtract sign
X=0
GTO 86
Rv // Roll Down
RCL 2
X<>Y
RCL 1
FRAC
1/x
STO 1
GTO 58
RCL 2 // Line 86
RCL 3
GTO 00 // Line 88
Formula use to calculate Bernoulli Number
B(n) = [2(2n)! ÷ ((2^2n) - 1)(Pi^2n)] [1 + (1/3^2n) + (1/5^2n) + ...]
Gamo