fractions / "decimals" in other bases? - 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: fractions / "decimals" in other bases? ( /thread-1128.html) |

fractions / "decimals" in other bases? - unfrostedpoptart - 04-21-2014 01:41 AM
New user again All the different base support on the WP32S is great and does what most people want most of the time. However, for us hardware types, who can be designing fixed-point circuits, it would be great if the other bases worked with floating (or at least fixed) point math. To me, changing base should mainly be the equivalent of changing the format string in a scanf or printf statement and not affect how the math is done internally. FYI, for people not used to this, 0.5D == 0.8X == 0.4O == 0.1B. This is, for example in binary, the digit to the right of the decimal (actually binary) point are halves, and then the next place are quarters, eights, etc. I've seen some calculators that do this. Don't know how much work it would be to have the WP implement this. Thanks much! David RE: fractions / "decimals" in other bases? - walter b - 04-21-2014 04:16 AM
(04-21-2014 01:41 AM)unfrostedpoptart Wrote: New user again It's tagged as "integer mode" and works as advertised. Please compare the HP-16C. As the WP 34S is a closed project, we won't change the math in said mode, sorry. Maybe it will come with the WP 43S though I didn't see much demand yet. Nevertheless, enjoy exploring your WP 34S. d:-) RE: fractions / "decimals" in other bases? - unfrostedpoptart - 04-21-2014 04:26 AM
Thanks for the reply Walter. I realize it works as the stock HPs. I was hoping for a way to add a new mode. I knew it was very unlikely - especially with focus now on the WP43S. David RE: fractions / "decimals" in other bases? - Paul Dale - 04-21-2014 04:39 AM
It would be possible to modify the display code to provide others bases -- it wouldn't be very easy though. The display code formats everything in base 10 and then goes into the finer points of all the display modes. The initial formatting would have to be changed and there are a lot of display modes to worry about. Better might be to write keystroke programs that uses integer mode to provide the desired fixed point support. - Pauli RE: fractions / "decimals" in other bases? - Massimo Gnerucci - 04-21-2014 07:16 AM
Just get one of these... :) RE: fractions / "decimals" in other bases? - Garth Wilson - 04-21-2014 07:35 AM
I'm not the least bit familiar with the WP32S, but I suspect you could write a program for the base conversions yourself, to go to and from any base, all with the same routines. I give the basics at http://wilsonminesco.com/16bitMathTables/index.html#BASE_CONV . There may not be anything new to you there, but give it a try. I mostly do embedded applications, and I use scaled-integer math. (Fixed-point is a special case of scaled-integer.) RE: fractions / "decimals" in other bases? - Joe Horn - 04-21-2014 11:22 AM
(04-21-2014 07:16 AM)Massimo Gnerucci Wrote: Just get one of these... Or any HP 48/49/50 with this installed. Works with "decimal fractions" in any base (2 through 62). Doesn't handle base 1 or base 0 very well, but that's ok, since conversions in those bases is easily done mentally. RE: fractions / "decimals" in other bases? - unfrostedpoptart - 04-21-2014 05:35 PM
Thanks for all the suggestions. Hopefully, there will be a straight-forward way to do this on the WP43S! RE: fractions / "decimals" in other bases? - Marcus von Cube - 04-21-2014 09:42 PM
(04-21-2014 01:41 AM)unfrostedpoptart Wrote: FYI, for people not used to this, 0.5D == 0.8X == 0.4O == 0.1B. This is, for example in binary, the digit to the right of the decimal (actually binary) point are halves, and then the next place are quarters, eights, etc. I don't think it's just the display code. In the WP 34S (and 31S) we have two number formats: BCD and binary integer. The BCD format just isn't suited well to support other bases then 10. (It's based on decima64/decimal128 which encodes three decimal digits in 10 bits). We would have to introduce another (binary?) number format to support your suggestion. But live is short and flash is full... |