[squeak-dev] Fwd: Posits [circular mapping between real numbers and the repressntation]

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Nov 11 22:22:34 UTC 2022


I have published an early implementation of Posit with very few PositTests
at http://www.squeaksource.com/STEM

Currently, reciprocal is not correct (it's the rough approximation given by
circle symmetry) , and the implementation of mathematical functions rely on
Float, which is only a good idea for small Posit representations (low
range, low precision).
The rest of arithmetic uses asFraction, which is not fast, but is exact.

I have not implemented a Quire, since by now we can perform all arithmetic
asFraction with infinite precision.
Quire has an interest if accelerated.

Also, the Posit intervals are not implemented, that would be interesting
too.

The decoding of Posit bit fields is duplicated at many places, and that
might be better factored.

The algorithm for correctly rounding to a Posit is also duplicated in
Float/Integer/Fraction.
Since it is not trivial, it definitely lacks tests.

If you wanna play...

Le jeu. 10 nov. 2022 à 18:34, Lauren P <drurowin at gmail.com> a écrit :

> Hi Lists,
>
> This is the first I've ever heard of posits.
>
> I certainly don't see the harm in including them in Squeak! If it isn't
> too arduous, I think we should.
>
> On Thu, Nov 10, 2022, 06:55 Tony Garnock-Jones <tonyg at leastfixedpoint.com>
> wrote:
>
>> Thanks for that link, Eliot! That led me down a rabbit hole [1][2], and
>> upon coming out I can say I officially love posits. Very cool stuff. (To
>> other readers of this message: if you read or skim only one document, it
>> should be [1] IMO.)
>>
>> Cheers,
>>    Tony
>>
>> [1]: https://posithub.org/docs/Posits4.pdf
>> [2]: https://posithub.org/docs/posit_standard-2.pdf
>>
>> On 11/9/22 17:54, Eliot Miranda wrote:
>> > It would be nice to have these alongside Float. Perhaps with a 128 bit
>> > representation…
>> >
>> > Begin forwarded message:
>> >
>> >> *From:* Annick Fron <annick.fron at afceurope.com>
>> >> *Date:* November 9, 2022 at 1:14:46 AM PST
>> >> *To:* vwnc NC <vwnc at cs.uiuc.edu>
>> >> *Subject:* *[vwnc] Posits*
>> >> *Reply-To:* Annick Fron <annick.fron at afceurope.com>
>> >>
>> >> Hi,
>> >>
>> >> Does anybody know about posits ?
>> >>
>> >> https://www.cs.cornell.edu/courses/cs6120/2019fa/blog/posits/
>> >>
>> >> Best regards
>> >>
>> >> Annick
>> >
>> > Eliot
>> > _,,,^..^,,,_ (phone)
>> >
>> >
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20221111/bbf87c8c/attachment.html>


More information about the Squeak-dev mailing list