$ python3 -c 'f = (lambda x: x + 0.5 - 0.5); print(f(2**52))' 4503599627370495.5
BTW, you can configure uBlock Origin to block all 3rd party javascript by default, but allow 1st party scripts, so you don't even need NoScript to get most of these benefits.
If you were pair programming, your pair could always create a new failing test with the current implementation.
But I'm not pair programming. And you can't always create a new failing test because int is a finite type. There are only about 4 billion cases to handle.
Which might take a while to type up manually, but that's why we have meta-programming: Code that generates code. (In C++ you could even use templates, but you might run into compiler recursion limits.)
More to the point, the risk with TDD is that all development is driven by failing test cases, so a naive approach will end up "overfitting", producing exactly the code required to make a particular set of tests pass and nothing more. "It can't pass all test cases"? It doesn't have to. For TDD, it only needs to pass the tests that have actually been written. You can't test all combinations of all inputs.
(Also, if you changed this function to use modulus, it would handle more cases than before, which is a change in behavior. You're not supposed to do that when refactoring; refactoring should preserve semantics.)
When you say "it can't pass all test cases", what do you imagine the tests look like?
Any ticket system that doesn't even let you copy/paste text snippets in (like, say, a bit of JSON from a log file) without messing up the rendering¹ is terrible.
¹) In two different ways: The rich text editor mangles data one way, but when you submit your comment, Jira mangles it in a different way. You never know what you're going to get.
Similarly, Perl lets you say
my $ret = do { if (...) { ... } else { ... }};
I agree with your core point, but no software is intuitive.
b == 7 is a boolean value
Citation needed. I'm pretty sure it's an int.
Do you know the difference between a script and a program?
A script is what you give the actors; a program is what you give the audience.
C++:
[](){}