math-export man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

MATH-EXPORT(2)							MATH-EXPORT(2)

NAME
       Math:  export_int, export_real, export_real32, import_int, import_real,
       import_real32 - conversion to and from external representation

SYNOPSIS
       include "math.m";
       math := load Math Math->PATH;

       export_int:    fn(b: array of byte, x: array of int);
       export_real32: fn(b: array of byte, x: array of real);
       export_real:   fn(b: array of byte, x: array of real);

       import_int:    fn(b: array of byte, x: array of int);
       import_real32: fn(b: array of byte, x: array of real);
       import_real:   fn(b: array of byte, x: array of real);

DESCRIPTION
       These routines convert between Limbo's internal representation of inte‐
       ger  and floating-point values, and equivalent external representations
       as arrays of bytes, allowing efficient input/output of binary represen‐
       tations.

       Export_int(b, x)	 converts  each	 integer  element  of  array  x into a
       sequence of 4 bytes in array b.

       Export_real(b, x) converts each double-precision floating-point element
       of array x into a sequence of 8 bytes in array b.

       Export_real32(b, x)  converts each double-precision floating-point ele‐
       ment of array x to a single-precision  value,  then  encodes  it	 as  a
       sequence of 4 bytes in array b.

       Each  import_T operation reverses the transformation of the correspond‐
       ing export_T operation, converting  an  array  of  bytes	 containing  a
       sequence	 of  external  representations	into an array of values of the
       appropriate internal form.

       Values are encoded in big-endian order (most significant	 byte  first),
       with  floating-point  values  represented in IEEE 32-bit or 64-bit form
       (again, most significant byte first).

SOURCE
       /libinterp/math.c

SEE ALSO
       math-intro(2)

								MATH-EXPORT(2)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net