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]

Byte ordering


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


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