Y
Hacker News
new
|
ask
|
show
|
jobs
by
wolvesechoes
252 days ago
There is no elegant solution in Rust to make something like
type Temperature_K is digits 6 range 0 .. <whatever is reasonable upper bound in your domain>;
1 comments
bluGill
252 days ago
at least that is an unsigned (though there are no usigned hardware floats). If you said tempemerature C there you range starts at -273.15 and you want errors of some sort to happen if you go below that.
link
estimator7292
252 days ago
Ideally, the program would freeze
link