You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Up until recently, we'd been thinking that, due to the vagaries of implementing real numbers on computers (e.g., float and double), we would avoid the problem by simply not having a primitive for them in Primer. But more recently, we've decided that we'd like to get to some kind of animation system sooner than later, so realistically, we'll need a primitive real number representation(s), after all.
Options would include:
Just wrap double and be done with it.
Some kind of symbolic computer algebra system (e.g., treat irrationals like 𝛑 symbolically)
2 would be the ideal, but is completely unrealistic. 3 looks like a good middle ground, but our type system can't currently represent type-level numbers, so this would be a fairly large project.
Probably we'll just do 1 for now, and skirt around issues such as rounding, precision, etc. (Most students, and even most professional programmers, are probably never introduced to these issues, anyway.) However, it might be nice to support 3 in the longer term: not only would it be a more honest treatment of real number representations on computers, it would also be a powerful demonstration of how expressive types are helpful to solve tricky representational problems.
The text was updated successfully, but these errors were encountered:
Up until recently, we'd been thinking that, due to the vagaries of implementing real numbers on computers (e.g.,
float
anddouble
), we would avoid the problem by simply not having a primitive for them in Primer. But more recently, we've decided that we'd like to get to some kind of animation system sooner than later, so realistically, we'll need a primitive real number representation(s), after all.Options would include:
double
and be done with it.rounded
2 would be the ideal, but is completely unrealistic. 3 looks like a good middle ground, but our type system can't currently represent type-level numbers, so this would be a fairly large project.
Probably we'll just do 1 for now, and skirt around issues such as rounding, precision, etc. (Most students, and even most professional programmers, are probably never introduced to these issues, anyway.) However, it might be nice to support 3 in the longer term: not only would it be a more honest treatment of real number representations on computers, it would also be a powerful demonstration of how expressive types are helpful to solve tricky representational problems.
The text was updated successfully, but these errors were encountered: