public static byte[] real_to_string( double n ) { if ( isnan(n) ) return getbytes( "+nan.0" ); if ( isinf(n) ) if ( n < 0.0 ) return getbytes( "-inf.0" ); else return getbytes( "+inf.0" ); return getbytes( n.ToString( "F" ) ); }