Recent

Author Topic: posits  (Read 895 times)


Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: posits
« Reply #1 on: July 21, 2019, 08:44:25 am »
Judging from this header https://gitlab.com/cerlane/SoftPosit/blob/master/source/include/softposit.h it is at least possible to create bindings for Freepascal without too much trouble. Hardware posit is usually implemented in FPGA's.

That would be 32 bit resolution Posit only for now, but given the density it has more than double the resolution of 32 bit floats if I understand it correctly.
Given that one of its main applications is AI and given that there are quite a few people on this forum interested in AI - including me - maybe we can give it a try..

-  The library seems for 64 bit cpu's only according to the documentation
+ Freepascal can use overloaded operators for most operations instead of e.g. posit16_t p16_mul(posit16_t, posit16_t) we can create an operator like this:
Code: Pascal  [Select][+][-]
  1. // single example, can create full set.
  2. operator * (const a,b:posit16_t):posit16_t
  3. begin
  4.   Result:=p16_mul(a, b);
  5. end;

Code like tat will make it very usable.
« Last Edit: July 21, 2019, 09:04:46 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018