c3d / db48x

RPL runtime for the DM42 calculator, in the spirit of HP48/49/50
http://48calc.org
GNU Lesser General Public License v3.0
81 stars 10 forks source link

Fundamental constants need to be updated to CODATA2022 (to be up to date) #1186

Open Wiljea opened 5 days ago

Wiljea commented 5 days ago

For the most recent revision CODATA2022, the reference for the extensive listing is https://physics.nist.gov/cuu/pdf/all.pdf

This concerns for instance basics like h, hbar, k, NA, σ, c3, ε0, μ0, α, etc. which are exactly defined (or exactly calculated) since 2019 and are all actually in error in db48x (or HP50g). And possibly other constants as well. One should check each one carefully. For a start, I actually need the correct values for these 9 constants. I may try to check later for other value to be corrected.

When I say exactly calculated, I mean that the value may have an infinite number of decimals, and therefore a numerical value which depends on the precision of the calculator, like for instance: hbar := h/(2·π) σ := (π^2/60)·k^4/(hbar^3·c^2) c3 := c·h/(kROOT((-5)EXPM1(-X)-X;X;2)) μ0 := 4·π·α·hbar/(e^2·c) ε0 := 1/(μ0·c^2)

And this rise the following important QUESTION: in the case of exactly calculated constants and even for other constants which are derived from experimental measurements (like the measurement of α that determines the values of μ0 and ε0) and will therefore vary in the future as the measurements will become more precise, will it be possible to provide an equation (in the constant file) instead of a fixed value which inevitably risk to become imprecise ? In my opinion this is necessary if we want to have a truly universal calculator in term of physics, math and engineering (which goes beyond certain outdated aspects of the HP50g). Your advice would be welcome on this subject.

c3d commented 5 days ago

Yes, the value that defines a constant can be any expression. Right now, this feature is only used to apply units. I think that an expression would parse correctly today, but I'm not positive it would be evaluated. If not, it's not hard to add.

Wiljea commented 5 days ago

Wow, that's nice because for me its an important point to stress because, first this exploits the very nature of db48x which has variable precision, and second, an updated of secondary constants (the ones related to measured quantities) by adapting their equations will only need a modification of the CSV file in case of calculations changes or related constants modifications. Doing so, will make the db48x a very unique and unprecedented scientific calculator (even useful for CODATA officials, complementing easily their Maple or Mathematica package). This is related to issue #1064.