• 23 Posts
  • 486 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle





  • What an insightful post 🙂

    The only one of these I’ve updated since the original is the one for Ars Technica, which is now this:

    arstechnica.com##:not(:not(head>title:has-text(/Serving the Technologist/))) article:has-text(/Trump|Elon|Musk|nazi|doge|maga/i)

    The reason being that ‘Ars Technica’ now appears in the title of articles, while it didn’t originally, which caused the original filter to block out entire articles. ‘Serving the Technologist’ only appears on the homepage so this updated filter will still filter the homepage but display the contents of articles that contain blacklisted words.











  • The correct answer in degrees is cos(pi) = 0.99849714986386383364. The correct answer in radians is cos(pi) = -1 (exactly). Any calculator giving you cos(pi) = -1 is definitely in radians mode - and if you mean you’re getting cos(pi) = exactly 1, and not 0.998, then that should never happen in any mode, unless it just has two digits of accuracy. Which I doubt any calculator with a ‘cos’ button has ever had.

    For the record, if using sine, you should have sin(pi) = 0.05480366514878953089 if in degrees mode, or sin(pi) = 0 (exactly) if in radians mode.



  • To be clear, when you say “exactly right”, do you mean -1 and 0 or -1 and -2.6776418E-07? Because -2.6776418E-07 is the more accurate answer here. 10+2 digits of accuracy does round the cosine to -1 because its first 13 digits after the decimal are all 9s, while 10+2 decimals of accuracy for the sine should be -0.000000266764 (12 digits) rounded to -0.0000002668 (10 digits rounded), then displayed as -2.668E-07 - so you actually end up with some bonus accuracy in this case. Though that last 8 should round up to a 9.



  • There isn’t really an issue here. The reason the cosine value is rounded to -1 while the sine value isn’t rounded to 0 is because the cosine value is much closer to -1 than the sine value is to 0. The unrounded (or less rounded) values are cos(355/113) = -0.99999999999996441843 and sin(355/113) = -0.00000026676418906242. So while the sine value is about 10^-7 from 0, the cosine value is about 10^-13 from -1, 6 orders of magnitude closer. Your calculator’s threshold for rounding is just somewhere between those magnitudes.

    As for why the latter two calculations give identical answers, that’s just a feature of sine itself: For very small inputs it’s an excellent approximation of the identity function, f(x) = x. If you give it any input of similar size to π - 355/113, it’ll more likely than not give you the exact same value back out. As x → 0, sin(x) → x. Try it out with other values like 0.0000000123456789.