author: niplav, created: 2024-09-26, modified: 2024-09-29, language: english, status: in progress, importance: 2, confidence: likely
.
Done.
Reasons for treating reals and integers as different:
Reasons for treating reals and reals (in this case probably floating point numbers or arbitrary-precision rational numbers) as the same:
I think that scripting languages can treat them as the same by default by now (given our Moorean utopia), but anything that wants to be used in product needs to give users the option to specify the type, and optimize accordingly.
double
: No, since 2 is clearly not a real
.f
: No, since Math.sin
is only defined for real
s.g
: Yes.Prediction: Error messages for both ~1
and 10
.
Result: Uncaught exception. Close enough.