[WP34s] More constants than CONST offers - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: Not HP Calculators ( /forum-7.html)+--- Forum: Not quite HP Calculators - but related ( /forum-8.html)+--- Thread: [WP34s] More constants than CONST offers ( /thread-1414.html) |

[WP34s] More constants than CONST offers - Dieter - 05-26-2014 08:34 PM
Looking at the 34s assembler documentation is seems there are more constants available than listed in the CONST menu. For instance pi/2, ln 2 or – very useful not only for the statistical distributions – sqrt(2 pi). Is there a special reason why these constants are hidden from the user and not directly accessible? Dieter RE: [WP34s] More constants than CONST offers - walter b - 05-26-2014 08:51 PM
Oh come on, you want to use your calculator, don't you? I voted against including 1/2 and Φ into CONST since they are trivial to calculate - well, not everybody knows Φ. But it will take you longer to recall ln(2) from CONST than to calculate it ... (man soll's ja auch nicht übertreiben). d:-/ RE: [WP34s] More constants than CONST offers - Dieter - 05-26-2014 09:05 PM
(05-26-2014 08:51 PM)walter b Wrote: Oh come on, you want to use your calculator, don't you? Yes. For instance for programming. And this can be done much more conveniently and elegantly with these additional constants. And they do not affect the stack and LastX either. Quote:I voted against including 1/2 and Φ into CONST since they are trivial to calculate Take a look at the quantile code I just posted. Did you count the number of "1/2" commands? This simple constant makes things so much easier. Before it was included I suggested a different version for the Normal quantile where 1/2 was even stored in a separate register so that it could be recalled from there whenever it was required. There also is another point: calculated results are not neccessarily exact. Take pi/2: both in SP and DP the result is 1 ULP off. So once again: why have these constants not been included in CONST while they are available in the assembler (and obviously get assembled to a valid opcode). Dieter RE: [WP34s] More constants than CONST offers - Paul Dale - 05-26-2014 11:32 PM
I don't remember that we really ever seriously considered the inclusion of these internal constants in the catalogue. Not all are relevant or usefully exposed, but some might be: - 1/sqrt(5)
- 1/sqrt(pi)
- sqrt(2 pi)
- pi / 2
- ln(2)
- 1/ln(2)
- 1/ln(10)
- 1/eH
- 1/eL perhaps
There would be a (small) space cost for exposing each additional constant. - Pauli RE: [WP34s] More constants than CONST offers - Dieter - 05-29-2014 03:43 PM
(05-26-2014 11:32 PM)Paul Dale Wrote: Not all are relevant or usefully exposed, but some might be: Is this a complete, comprehensive list of all available constants not included in the CONST menu? A few of these would really make sense, for instance multiples of pi like pi/2, pi/4, 2pi and, as already mentioned, sqrt(2pi). Walter said he does not like constants that can easily be obtained from others. Great – this way we can get rid of a lot of physical constants. Take for instance h and ħ (which is simply h divided by 2 pi) or Φ _{0} which is nothing but 1/K_{j} and therefore as useful has having a separate 1/pi constant (which would even have the benefit of slightly better accuracy). Removing redundancies like these will free up space for universally useful constants like the ones suggested.Hey, I just found a way how to use the additional constants with current firmware: simply use the CNST command. This is what I got: Code: `CNST 77 = 1/eH (higher 34 digits of 1/e, as used in Lambert's W)` So at least these constants can be used in user programs. Readability is another point... Dieter |