Decimal floating point number to binary: Difference between revisions
Decimal floating point number to binary (view source)
Revision as of 10:56, 4 June 2018
, 6 years ago→{{header|Go}}: Formatting change to suppress trailing zeros.
(Added Go) |
m (→{{header|Go}}: Formatting change to suppress trailing zeros.) |
||
Line 474:
func main() {
f := 23.34375
fmt.Printf("%
s := "1011.11101"
fmt.Printf("%s\t => %v\n", s, binToDec(s))
Line 481:
{{out}}
<pre>
23.
1011.11101 => 11.90625
</pre>
|