[squeak-dev] Floats

Bert Freudenberg bert at freudenbergs.de
Wed Oct 11 18:18:02 UTC 2017


On Wed, Oct 11, 2017 at 8:07 PM, Tobias Pape <Das.Linux at gmx.de> wrote:

>
> > On 11.10.2017, at 19:59, Bert Freudenberg <bert at freudenbergs.de> wrote:
> >
> > On Wed, Oct 11, 2017 at 5:24 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
> > Hi all
> >
> > I'm a bit stumped…
> >
> > What is our canonical way to put a Float onto a (binary) stream?
> > To be precise a IEEE754 double precision 64-bit float onto a stream, of
> which I only know that it is a binary one.
> >
> > I found ByteArray>>doubleAt:{put:}bigEndian:, but they have neither
> senders nor test _and_ it is not a stream.
> >
> > What do y'all use?
> >
> > You write them as two words, like e.g. in DataStream>>writeFloat:.
>
> Quite. yes.
>
> But I find it strange that our read/write streams support various integer
> and string reading/writing helpers, but none for floats…
>
> Best regards
>         -Tobias
>

​I guess file formats using integers and strings are way more common than
ones storing binary floats.

- Bert -​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171011/77f0203f/attachment.html>


More information about the Squeak-dev mailing list