Jump to content

Decimal floating point number to binary: Difference between revisions

m
→‎{{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("%fv\t => %s\n", f, decToBin(f))
s := "1011.11101"
fmt.Printf("%s\t => %v\n", s, binToDec(s))
Line 481:
{{out}}
<pre>
23.34375034375 => 10111.01011
1011.11101 => 11.90625
</pre>
9,487

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.