On Fri, Oct 23, 2015 at 3:08 AM, <bert at qqmail.nl> wrote: > Computers don't store values in base-10 fractions when they use doubles or > floats; they use base-2 fractions. This causes that your simple base-10 > fractions can't be stored exactly. >
?Unless the architecture implements the newest IEEE-754-2008 "decimal floating point"? ref: https://en.wikipedia.org/wiki/Decimal_floating_point ?I, personally, only know of one such machine. And it is not really "popular", except with really _huge_ customers: The IBM z series machine. It can run 5 different OSes: 4 are IBM proprietary the 5th is Linux. This machine is not Intel compatible, in any way, shape, or form. And it is super expensive. Which is why it's not "popular". Running Linux, the largest has 114 cores and SMT for 228 simultaneous "threads", all in a single "box". OK, it is a _big_ box <grin/>. https://pbs.twimg.com/media/BP8HYj9CQAA17g3.jpg:medium That's about the size on an entire 19 inch rack (more or less). Also, as Mr. Long indicated, this entire series of machines have a decimal data type in the hardware (normally called "packed decimal", which "packs" 2 decimal digits per bytes, except for the last byte which reserves the last nybble for a sign indicator). There are instructions which translate from binary to/from packed decimal and packed decimal to/from "printable" decimal (called zoned decimal for historical reasons due to old style punched cards). > > This is also why those other -not lite- engines have a decimal type, > processed using much slower integer logic coded in their engines... but > this doesn't make the current floating point arithmetic broken in any way. > > Bert > -- Schrodinger's backup: The condition of any backup is unknown until a restore is attempted. Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! <>< John McKown