This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Byte ordering


  This reference may help you

      http://www.faqs.org/rfcs/rfc1832.html

It describes the External Data Representation Standard, useful for
encoding and transfering data (floating-point numbers too) between
different computer architectures.  I don't know if there is
a working implementation.

  Hope it helps.

  Jose

On Tue, Sep 30, 2003 at 07:41:25AM -0700, Z F wrote:
> Hello everybody,
> 
> 
> Even though this question is not directly related to GSL, indirectly
> --- it is.
> 
> I have a scientific calculation program (which uses GSL) but most
> importantly it uses doubles. I need to transfer those data to another
> computer. The problem is that if the two computers have different byte
> ordering, I have to do something special about the data. I understand
> that there is a network standard for shorts and for ints to serve this
> purpose. I could not find any standards to transfer doubles/floats over
> net. I the past I could live with printf()-type things and convert all
> doubles to strings and pass strings since ASCII is more universal.
> This, however, increases the data size by a factor of three.
> 
> The current problem I am working on has data output rate of about
> 5-15MBytes/sec and increasing it by factor of three is not feasible.
> 
> Could someone, please, point me in the right direction? Should I
> give-up  on portability of my code and assume/hope that both ends use
> the same 
> byte ordering?
> 
> I know that this is not directly related to GSL, but all the network
> people do not seem to care about doubles so I have to turn to
> "scientific" network programming....
> 
> Thank you very much for your input,
> 
> Lazar
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com

-- 
Jose M. Perez-Jorda
Departamento de Quimica Fisica
Universidad de Alicante
Apartado 99
E 03080 Alicante
SPAIN
FAX:   (34) 965903537
PHONE: (34) 965909667
Email: jmpj@ua.es

Yo también quiero una Europa sin Patentes de Software 
--------------------------------------------------------------
 EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
--------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]