redefine (physical) constants
|
10-01-2023, 07:05 PM
Post: #1
|
|||
|
|||
redefine (physical) constants
I noticed that some of the physical constants that one has access to on the HP Prime are ever so slightly off. Or to be more precise we in the meantime have more exact values for some of them and that isn't yet taken into account by the HP Prime (even with the most recent update).
Take for example the Stefan-Boltzmann constant sigma. It's value (without units) is 5.670 374 419*10^-8 according to what we currently know [1]. According to the HP Prime its value is however 5.670 367*10^-8 So I was wondering if I could somehow redefine these physical constants on my own HP Prime. If so, how? I'm aware of the possibility of adding user defined constants, but that's not what I'm looking for here. Thinking more long-term I also wonder where and how I could report the underlying issue. Because then I would go through all the constants available on the HP Prime and compile a list of what should be updated and with what values. [1] https://physics.nist.gov/cgi-bin/cuu/Value?sigma |
|||
10-02-2023, 05:28 AM
Post: #2
|
|||
|
|||
RE: redefine (physical) constants
There is a bug tracker. I see there is a ticket titled 'Update the Constants for Physics and Chemistry', which also refers to the page you mentioned, so there is a possibility that with the next firmware version, all the constant values listed on that website will be updated.
PK |
|||
10-02-2023, 09:38 AM
Post: #3
|
|||
|
|||
RE: redefine (physical) constants
If you want to change the unit values that are used inside the CAS, please do not use the bug tracker, reply below, and reply only with the lines that should be corrected, with the fixed value. Thanks!
Code:
|
|||
10-02-2023, 06:56 PM
(This post was last modified: 10-02-2023 07:02 PM by komame.)
Post: #4
|
|||
|
|||
RE: redefine (physical) constants
(10-02-2023 09:38 AM)parisse Wrote: If you want to change the unit values that are used inside the CAS, please do not use the bug tracker, reply below, and reply only with the lines that should be corrected, with the fixed value. Thanks! Why is this constant on the list different from the one in the HP Prime? Maybe I'm missing something... Furthermore, there's yet another value under the 'Help' key Piotr Kowalewski |
|||
10-03-2023, 05:48 AM
Post: #5
|
|||
|
|||
RE: redefine (physical) constants
(10-02-2023 06:56 PM)komame Wrote:Because CAS and Home have their own unit computation systems. That's why I said "unit values that are used inside CAS".(10-02-2023 09:38 AM)parisse Wrote: If you want to change the unit values that are used inside the CAS, please do not use the bug tracker, reply below, and reply only with the lines that should be corrected, with the fixed value. Thanks! |
|||
10-04-2023, 05:27 PM
(This post was last modified: 10-05-2023 12:32 AM by komame.)
Post: #6
|
|||
|
|||
RE: redefine (physical) constants
(10-02-2023 09:38 AM)parisse Wrote: If you want to change the unit values that are used inside the CAS, please do not use the bug tracker, reply below, and reply only with the lines that should be corrected, with the fixed value. Thanks! Mr. Parisse, I have found several outdated constants. Below is a list of them with updated values. Code: const mksa_unit __sigma_unit={5.670374419e-8,0,1,-3,0,-4,0,0}; // Stefan-Boltzmann constant https://physics.nist.gov/cgi-bin/cuu/Value?sigma https://physics.nist.gov/cgi-bin/cuu/Value?h https://physics.nist.gov/cgi-bin/cuu/Value?hbar https://physics.nist.gov/cgi-bin/cuu/Value?evj https://physics.nist.gov/cgi-bin/cuu/Value?k https://physics.nist.gov/cgi-bin/cuu/Value?na https://physics.nist.gov/cgi-bin/cuu/Value?bg https://physics.nist.gov/cgi-bin/cuu/Value?mub https://physics.nist.gov/cgi-bin/cuu/Value?mun https://physics.nist.gov/cgi-bin/cuu/Value?me https://physics.nist.gov/cgi-bin/cuu/Value?mp https://physics.nist.gov/cgi-bin/cuu/Value?ep0 https://physics.nist.gov/cgi-bin/cuu/Value?mu0 Best regards Piotr Kowalewski |
|||
10-05-2023, 05:21 PM
Post: #7
|
|||
|
|||
RE: redefine (physical) constants
Mr. Parisse,
besides the list of 13 constants above, I found an additional 5: Code: const mksa_unit __R__unit={8.314462618,2,1,-2,0,-1,-1,0}; // molar gas constant Piotr Kowalewski |
|||
10-05-2023, 05:40 PM
Post: #8
|
|||
|
|||
RE: redefine (physical) constants
Update done, thank you!
https://github.com/geogebra/giac/commit/...d7fe909fba |
|||
10-05-2023, 06:01 PM
Post: #9
|
|||
|
|||
RE: redefine (physical) constants
There seems to be one more. According to https://physics.nist.gov/cgi-bin/cuu/Value?e,
Code: const mksa_unit __qe_unit={1.60217733e-19,0,0,1,1,0,0,0}; should be Code: const mksa_unit __qe_unit={1.602176634e-19,0,0,1,1,0,0,0}; Since the conversion between Joule and eV depends on the fundamental charge, maybe it would be easier to set the value of __qe_unit to be __eV_unit or vice versa? |
|||
10-05-2023, 07:34 PM
Post: #10
|
|||
|
|||
RE: redefine (physical) constants
(10-05-2023 06:01 PM)nbc12 Wrote: There seems to be one more. According to https://physics.nist.gov/cgi-bin/cuu/Value?e, Indeed, I noticed that as well. However, I didn't want to write another post without making sure that I wouldn't find anything else. Here are the rest that I managed to identify, and with this, I conclude my further search: Code: const mksa_unit __lambdac_unit={2.42631023867e-12,1,0,0,0,0,0,0,0}; // Compton wavelength Please just check this last one (inverse meter-electron volt relationship), as I wasn't sure if it's just a coincidence: https://physics.nist.gov/cgi-bin/cuu/Value?minvev Mr. Parisse, please update for this list as well. This is definitely the last one from my side. Piotr Kowalewski |
|||
10-09-2023, 05:49 AM
Post: #11
|
|||
|
|||
RE: redefine (physical) constants
Mr. Parisse,
could you confirm that this third part of the constants update has also been updated in the source code? (10-05-2023 07:34 PM)komame Wrote: I will be very grateful for a response. Thank you. |
|||
10-09-2023, 06:02 AM
Post: #12
|
|||
|
|||
RE: redefine (physical) constants
Yes, I committed the change.
|
|||
10-09-2023, 11:27 AM
Post: #13
|
|||
|
|||
RE: redefine (physical) constants
Hello friends,
I'm not able to get the corrected values into my machine. In which program core I have to embed the codeline "const mksa_unit __sigma..." to change the predefined values permamently? |
|||
10-09-2023, 12:45 PM
Post: #14
|
|||
|
|||
RE: redefine (physical) constants
You can't yourself, you have to wait for a firmware release on a Prime including these changes (the source code slice you see above is from Giac/Xcas).
|
|||
10-09-2023, 04:57 PM
Post: #15
|
|||
|
|||
RE: redefine (physical) constants
(10-02-2023 05:28 AM)komame Wrote: There is a bug tracker. I see there is a ticket titled 'Update the Constants for Physics and Chemistry', which also refers to the page you mentioned, so there is a possibility that with the next firmware version, all the constant values listed on that website will be updated. I see, let's hope for the best then! It's great that parisse already was able to update it in CAS though. (I understand that on the HP Prime we will only benefit from that after the next firmware update, but still.) Thank you for compiling the list of physical constants that need(ed) to be updated, Piotr. |
|||
10-12-2023, 08:36 AM
Post: #16
|
|||
|
|||
RE: redefine (physical) constants
Hello Mr. Parisse,
thank you for your quick answer. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)