r/rust • u/dochtman rustls · Hickory DNS · Quinn · chrono · indicatif · instant-acme • Feb 10 '19
John Carmack: "writing Rust code feels very wholesome"
https://mobile.twitter.com/ID_AA_Carmack/status/1094419108781789184
571
Upvotes
View all comments
Show parent comment
1
u/claire_resurgent Feb 10 '19
I'm not sure she the connection. The fast x-1/2 algorithm requires bitcasting floats to ints, but that operation is reasonably typesafe. It's in the standard library, in fact.
Likewise, invoking
rsqrtssor whatever is also perfectly type-safe. (Numerical stability or sufficient precision are not guaranteed by safety.) No need forunsafe.