Lovely localization bug discovered in Apple iOS Shortcuts just now by @goatsarah
Note that numbers are localized with commas for decimal, and periods for thousands here. This is important.
x = 23816 / 10937 // 2,17756240
Display arctan(x) // 1,5707963
This is not correct.
arctan(2.17756240) == 1.1402940
What's up? Well, if you store your results as JSON strings truncated to 3 decimal places and localized {"x": "1,775"} and your JSON parser isn't locale aware... well, what is arctan(1775)? 🤦♀️