frank-lang / frank

Frank compiler
GNU General Public License v3.0
272 stars 9 forks source link

Add floats #5

Closed leopoulson closed 4 years ago

leopoulson commented 4 years ago

This PR adds support for floating-pt numbers. It entails adding a new built-in type, Float, and corresponding operations; +~, -~, *~, /~, <~, >~ and ==~. For completeness, I also added an operation for equality over integers.

It also has two functions to convert from Int to Float and vice versa, toFloat and round respectively. round f will round f to the nearest Int.

leopoulson commented 4 years ago

Closed, replaced by #6.