fractions / "decimals" in other bases?
|
04-21-2014, 01:41 AM
Post: #1
|
|||
|
|||
fractions / "decimals" in other bases?
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 |
|||
04-21-2014, 04:16 AM
Post: #2
|
|||
|
|||
RE: fractions / "decimals" in other bases?
(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:-) |
|||
04-21-2014, 04:26 AM
Post: #3
|
|||
|
|||
RE: fractions / "decimals" in other bases?
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 |
|||
04-21-2014, 04:39 AM
Post: #4
|
|||
|
|||
RE: fractions / "decimals" in other bases?
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 |
|||
04-21-2014, 07:16 AM
Post: #5
|
|||
|
|||
RE: fractions / "decimals" in other bases?
Just get one of these... :)
Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
04-21-2014, 07:35 AM
(This post was last modified: 04-21-2014 07:39 AM by Garth Wilson.)
Post: #6
|
|||
|
|||
RE: fractions / "decimals" in other bases?
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...#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.)
http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
04-21-2014, 11:22 AM
Post: #7
|
|||
|
|||
RE: fractions / "decimals" in other bases?
(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. <0|ɸ|0> -Joe- |
|||
04-21-2014, 05:35 PM
Post: #8
|
|||
|
|||
RE: fractions / "decimals" in other bases?
Thanks for all the suggestions. Hopefully, there will be a straight-forward way to do this on the WP43S!
|
|||
04-21-2014, 09:42 PM
Post: #9
|
|||
|
|||
RE: fractions / "decimals" in other bases?
(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... Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basic-compare.html |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)