oils-for-unix / oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
http://www.oilshell.org/
Other
2.81k stars 152 forks source link

Floating Point Support #1144

Open andychu opened 2 years ago

andychu commented 2 years ago

This will probably be left out of the first version of oil-native (unless an expert comes along and helps!) Based on what I've seen in CPython, it's not trivial to do correctly.

But also found out about the hexfloat format just now! This could be useful for QTT as well.

https://www.cplusplus.com/reference/ios/hexfloat/

andychu commented 2 years ago

This was from the comments on Concise Encoding: https://news.ycombinator.com/item?id=31475779

There are some interesting discussions on date and time notation there too

I think Oil should have some kind of syntactic sugar for plain old Unix time stamps ... (hopefully int64 and not int32 :) )

andychu commented 2 years ago
andychu commented 1 month ago

We are basically using libc now, it has good floating point support!

We have NAN and INFINITY now