-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More numeric types #81
Comments
F60 and U60 are now merged on Master. I don't think we should have other integer types. |
@VictorTaelin Can you comment on / give links to some papers on how to lower signed integers (in higher-level languages) to unsigned integers (in HVM as a backend)? It's not immediately obvious to me. |
Hmm perhaps adding |
Do we have f32 and i32 already? |
No, I think f32/i32/u32 should just be implemented as a lib, but not too sure about that. Any reason you think these should be native? I believe a minimalist design is important, must have caution not to become a bloated spec |
If f32/i32/u32 can be implemented as a lib without performance issues I'm totally fine with it. I was just thinking about use-cases for games where f32's are used heavily. I'd assume we'd want to be able to take advantage of hardware float operations, which I wasn't sure if we could do in a lib or not. |
In that case you should just use a F60. Since the pointer size is 64, a F32 would just have 28 empty bits. What we could (should?) do in a future perhaps is have a 32-bit version of HVM? |
That's an interesting question. I'm not sure if using 64 bit floats everywhere would have negative impact on performance or not. Maybe a 32-bit HVM does make sense. I don't know. 🤷♂️ |
Originally posted by @samtoth in #38 (comment)
I32
F32
U64
,I64
F64
The text was updated successfully, but these errors were encountered: