updating oE atom_to_float64


include convert.e 
namespace convert 
public function atom_to_float64(atom a) 

converts an atom to a sequence of 8 bytes in IEEE 64-bit format.

  1. a : the atom to convert:

A sequence, of 8 bytes, which can be poked in memory to represent a.


All Euphoria atoms have values which can be represented as 64-bit IEEE floating-point numbers, so you can convert any atom to 64-bit format without losing any precision.

Integer values will also be converted to 64-bit floating-point format.

Example 1:
fn = open("numbers.dat", "wb") 
puts(fn, atom_to_float64(157.82)) -- write 8 bytes to a file 
See Also:

float64_to_atom, int_to_bytes, atom_to_float32

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu