HP Forums
Physics brushup - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: Physics brushup (/thread-21631.html)



Physics brushup - Gerson W. Barbosa - 04-21-2024 12:21 AM

Wife: "What are you doing?"
Me: "Refreshing my Physics!"

[Image: 53667672104_4db246c597_b.jpg]


RE: Physics brushup - Thomas Klemm - 04-21-2024 02:01 AM

\(\gamma\)


RE: Physics brushup - Gerson W. Barbosa - 04-21-2024 03:32 AM

(04-21-2024 02:01 AM)Thomas Klemm Wrote:  \(\gamma\)

Yes, 14 steps and 14 bytes on the HP-15C. All 10 significant digits.

Can you do better? :-)


RE: Physics brushup - Thomas Klemm - 04-21-2024 06:57 AM

No, not using only basic arithmetic commands like you did.

But we can use:

\(
\gamma = - \int_0^1 \log \left( \log \left( \frac{1}{x} \right) \right)\mathrm{d}x
\)

With the following program:
Code:
   001 { 42 21 11 } f LBL A
   002 {       15 } 1/x
   003 {    43 12 } g ln
   004 {    43 12 } g ln
   005 {    43 32 } g RTN

Use:

1 ENTER 0 \(\int \begin{matrix}
x\\
y
\end{matrix}\) A

However, it will take a bit longer than your program.

[Image: attachment.php?aid=13471]


RE: Physics brushup - Thomas Klemm - 04-21-2024 09:58 AM

Here's another one:
Code:
   001 { 42 21 11 } f LBL A
   002 {        3 } 3
   003 {       15 } 1/x
   004 {       11 } sqrt(x)
   005 {    43 32 } g RTN

0.5773502692

Short, fast but inaccurate.
But I'm sure you already knew that.


RE: Physics brushup - Gerson W. Barbosa - 04-21-2024 12:25 PM

The exact 10-digit result is 0.5772156649.
The integral result is 0.5572156635 (FIX 9), both on the HP emulator and on the JRPN simulator.
On the HP-15CE the result is 0.5572156619 (FIX 8), but it takes about four minutes and twenty seconds. Nice integral anyway.
14 steps, including LBN and RTN, but perhaps the limit hasn’t been reached yet.


RE: Physics brushup - Namir - 04-23-2024 03:09 AM

Euler constant = 1/sqrt(3+1/715) = 0.57721574 which is accurate to 6 decimals.

Namir


RE: Physics brushup - Gerson W. Barbosa - 04-24-2024 01:32 AM

(04-23-2024 03:09 AM)Namir Wrote:  Euler constant = 1/sqrt(3+1/715) = 0.57721574 which is accurate to 6 decimals.

Namir

Yes,

I had tried that one as well, but it only returns 0.5772156648, even if the steps 12 and 13 are swapped. There is another 14-step program that returns 0.5772156649 on the 15C (rather obvious, I wonder how I missed it), but I’ll start a specific thread in the main forum later.

Regards,

Gerson.

Code:

#  Program occupies 14 bytes.

   000 {          } 
   001 { 42 21 11 } f LBL A
   002 {        7 } 7
   003 {        1 } 1
   004 {        4 } 4
   005 {       48 } .
   006 {        6 } 6
   007 {        2 } 2
   008 {        3 } 3
   009 {       15 } 1/x
   010 {        3 } 3
   011 {       40 } +
   012 {       11 } sqrt(x)
   013 {       15 } 1/x
   014 {    43 32 } g RTN