Comment

Comment by tavianator

You're cheating by using floating-point arguments; they should be integers:

    >>> x = 9007199254740990
    >>> percent(x - 1, x)
    99
But then again,

    >>> percent(10 * x - 1, 10 * x)
    100
If your procedure has 2^53 steps, feel free to ignore my rounding recommendations, since I'll never see it get anywhere near 100% :)

Also if your username is named after the band, good taste :)

parent tavianator 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton