Decimal floating point number to binary: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: bsae 2 -> 2/4/8/16/32)
Line 1,166: Line 1,166:
in a way that you just cannot do for most other (ie non-power-2) bases.<br>
in a way that you just cannot do for most other (ie non-power-2) bases.<br>
Update: Added a limiter for non-base-2 fractions, as per 1/3 -> 0.333 forever in decimal.
Update: Added a limiter for non-base-2 fractions, as per 1/3 -> 0.333 forever in decimal.
Base 2/4/8/16/32 are guaranteed to terminate anyway, but for other bases we need some limit
Base 2/4/8/16/32 are guaranteed to terminate anyway, but for other bases we need some limit -
- the 15 that I opted for is completely arbitrary.
the 15 that I opted for is completely arbitrary.


=={{header|Python}}==
=={{header|Python}}==