Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 801 Bytes

Fixed Point.md

File metadata and controls

24 lines (18 loc) · 801 Bytes

Fixed point numbers using keywords fixed/ufixed are not fully supported by Solidity yet.

They can be declared, but cannot be assigned to or from.

There are fixed-point libraries that are widely used for this such as DSMath, PRBMath, ABDKMath64x64 etc.

Fixed-point numbers, declared with (u)fixedMxN so where M is the size in bits (increments of 8 up to 256) and N is the number of decimals after the point (up to 18); e.g., ufixed32x2.


Slide Screenshot

044.jpg


Slide Deck

  • Fixed vs. Floating
  • Keyword: fixed & ufixed
  • Solidity: No Real Support
  • Libraries: DSMath, PRBMath, ABDKMath64x64 etc.

References