I could write a message about how I've disrupted that claim, but I prefer my messages to be more meta and self referential (like this one)
And also slightly contradictive
Like the message two messages above (and this one too probably)
And now for the replies and conversation continuations doing one of the following: a) making a meta message joke in response to mine, b) pointing out some sort of logical flaw in one of my four messages (counting this one) or c) contradicting this message by either directly referencing it or completely ignoring it
Thanks, good point. I'll add a required accuracy. The formula suggested by math overflow has a accuracy of 3e-6 so surprisingly close to your suggested 1e-6 but just barely too much
What if I had a built-in that took a function and a result and iteratively approximated a number such that the function applied to that number would give the given result, and then I used that?
@Adám I'm unfamiliar with BQN, I'd assume it would assume the inverse of a function especially mathematical would be special cased with a efficient implementation
Right. E.g. in TMN, "sin x cos y" solves two distinct challenges: ∘ given x and y, compute the sine of the product of x and the cosine of y ∘ given x and y, compute the product of the sine of x and the cosine of y
it is only the goodwill of the reader (using the context of the stated formula) that determines the correct interpretation.
Similarly, "a/bc": ∘ given a, b, and c, compute a divided by the product of b and c ∘ given a, b, and c, compute the product of a divided b and c
Euler's constant (sometimes called the Euler–Mascheroni constant) is a mathematical constant, usually denoted by the lowercase Greek letter gamma (γ), defined as the limiting difference between the harmonic series and the natural logarithm, denoted here by log:
γ
=
lim
n
→
∞...
@RubenVerg If you do that you'll constantly exhaust the precision limit in intermediate steps, making it very hard to actually get the final state right without losing accuracy when combining them
@Bubbler that is, every basic arithmetic on floats accumulates errors, and unless you rely on hardware support, any reasonable impl will use thousands or millions of float arithmetic
so you almost never get the "closest possible float" with any reasonable means
@mousetail gamma is only the difference towards infinity, and the error for finite x (difference between lnx+gamma and Hx) is ~1/2x according to wikipedia
so it doesn't quite work when x is small
also I guessed I need to handle non-integer inputs
@Bubbler this works with non-integers (because any float can be written as a rational, and any real can be approximated to one) and limits the "finite" error to small enough value
My favorite way of calculating the natural logarithm:
$$\ln(x)\approx-\gamma+\sum_{n=1}^x\frac1n$$
Where $\gamma$ is the Euler-Mascheroni constant. Not only is this easy, but it works quite well for something like $x>10$.
If you need to calculate other bases, like $\log_b(x)$, use $\log_b(x)=...
Vanilla Natural Logarithm Challenge code-golfmathnumber
There is a challenge for multiplying two numbers so I guess this counts too
Given as input a positive real number n compute it's natural logarithm.
Your answer should be within \$10^{-6}\$ for \$1 \leq n \leq 10\$ and within \$10^{-3}\$ for ...
@mousetail create a community wiki answer for all the built-in answers
solves the problem of boring answers (they become edits on a single post) yet still allows for a catalogue of languages with built-ins without anyone getting "free" rep (if that's a concern)
If they where actually submitting to a journal they'd probably have some secretary look it over but for most daily teaching tasks it doesn't really matter
@Hippopotomonstrosesquipedalian : i REALLY don't care which whacko codepage it is in - show me the exact hex dump or octal dump of those 19 bytes you claim, or base64 or URL encode it, whichever way you prefer - you claim 19 bytes i wanna see how you substantiate your claim — RARE Kpop Manifesto9 hours ago
Prompted by this.
The question of APL's encoding often comes up, and many times a helpful soul links to Wikipedia's article on the APL EBCDIC codepage. However, each implementation of APL has its own encoding rules. What are they?
@mousetail Correct. Dyalog Unicode is the interpreter version (which hints at how the interpreter stores text internally), but code golf submissions are assumed to use my SBCS.
@emirps : it's ambiguous even though it literally has the word a.w.k. right at the the start of the command not named "echo" ? are you a professional troll or just an amateur one ? That piece of code i wrote is 100% POSIX-compliant and you wanna claim it's ambiguous ? or do i need to explain what echo is about ? — RARE Kpop ManifestoMay 9 at 2:02
@Seggan : i apologize for not being well versed in a language that requires a trademark infringing codepage in order to meet its byte claims — RARE Kpop Manifesto1 min ago
@Hippopotomonstrosesquipedalian : and what correct answer have you provided other than rushing to lecture others about not knowing a language that requires trademark infringing codepages to work ? — RARE Kpop Manifesto3 mins ago
@Hippopotomonstrosesquipedalian : and isn't it funny … this language somehow felt the need to be so comprehensive it has separate operators for NAND and NOR, despite both being a direct inversion of the outcomes of AND and OR, and yet, doesn't have an operator for XOR. And you actually believe these choices are logical ones instead of them stemming from a language that was, and still is, directly manipulated for individual code golfing challenges ? — RARE Kpop Manifesto1 min ago
STACK EXCHANGE DEVS: STOP CHANGING THE GOD DAMN UI. IT IS GOOD THE WAY IT IS AND YOUR CHANGES ALWAYS SEEM TO PISS OFF MORE PEOPLE THAN THEY PLEASE. JUST LEAVE IT BE.
About a year ago, the Product team, focused on improving the general experience, conducted an experiment to update the styling of the voting arrows on Stack Overflow in order to improve accessibility and meet Web Content Accessibility Guidelines (WCAG) compliance. We shared positive results from ...
Is weireds my out how proud top stack overflow members are about how much they downvote. Yes it's important for the quality of the site but you don't need to brag about how negatie your vote ratio is