Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Virgil allows the maximum amount of implicit int->float injections that don't change values and allows casts (in both directions) that check if rounding altered a value. It thus guarantees that promotions and (successful) casts can't alter program behavior. Given any number in representation R, promotion or casting to type N and then casting back to R will return the same value. Even for NaNs with payloads (which can happen with float <-> double).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: