News for hackers. Stuff that matters.
Re:Don’t Fall for Babylonian Trigonometry Hype by chroem- on Tuesday August 29, 2017 @06:56PM (#15128300)
>that's a concrete claim with is 1) easily verifiable and 2) wrong

I fail to see how it's wrong. If you call Math.sin(x) it will return an iterative numerical approximation of sine. Would you care to elaborate rather than casually dismissing it?

> There's so much wrong with that, it's hard to know where to start.

Such as? 60 has more prime factors than 10, and therefore using it as a numeric base will result in you encountering fewer irrational numbers. You really can't argue against that.

Re:Don’t Fall for Babylonian Trigonometry Hype by jdmichal on Tuesday August 29, 2017 @07:39PM (#15128558)
> Such as? 60 has more prime factors than 10, and therefore using it as a numeric base will result in you encountering fewer irrational numbers. You really can't argue against that.

Actually, I can argue with that. Irrationality is a property of the number, not the representation. An irrational number cannot be written as a terminating "decimal" in any base. And, of course, a rational number can be written as an integer fraction in any base.

https://math.stackexchange.com/a/625481

EDIT: Ignoring, of course, doing silly things like saying pi is rational in base-pi... Which I think deserves a spot in some circle of mathematical purgatory. Also, I wonder if every number except pi and its multiples are non-terminating in base-pi...

Re:Don’t Fall for Babylonian Trigonometry Hype by sillysaurus3 on Tuesday August 29, 2017 @09:23PM (#15129020)
silly things like saying pi is rational in base-pi... Which I think deserves a spot in some circle of mathematical purgatory

Hmmm...

Anybody know any resources related to that? I'm interested in the properties of base-pi.

I found this: https://math.stackexchange.com/a/2188852

Strange bases are pretty cool. Any integer can be converted into base-sqrt(2) by interleaving zeoes into its binary representation. E.g. 5 in base-sqrt(2) is 010001, 21 (0b10101) is 0b0100010001, etc. Possibly useless, but neat.

Also: https://www.quora.com/Can-we-have-a-number-system-with-the-b...

Knuth considers transcendental bases (ee is a transcendental number) in The Art of Computer Programming – in the section called Positional Number Systems. One of the consequences of using irrational bases is unfortunately that numbers need not have a unique representation.

EDIT: Wow, this is awesome: https://www.quora.com/What-is-10-in-base-pi

Specifically the answer from Dave Williamson. It's ridiculously comprehensive. He shows how to calculate it using pure math, using a calculator, by writing a program, and demonstrates a partial proof on some of the properties.

Re:Don’t Fall for Babylonian Trigonometry Hype by Someone on Wednesday August 30, 2017 @02:12AM (#15130019)
Neither mentions base π, but you may be interested in https://en.wikipedia.org/wiki/Non-integer_representation, which even claims applications: "There are applications of β-expansions in coding theory (Kautz 1965) and models of quasicrystals (Burdik et al. 1998)." and https://en.wikipedia.org/wiki/Quater-imaginary_base.

(Surprisingly, there seems to be less content on this on mathworld)

Re:Don’t Fall for Babylonian Trigonometry Hype by Lazare on Tuesday August 29, 2017 @07:30PM (#15128504)
> I fail to see how it's wrong. If you call Math.sin(x) it will return a numerical approximation of sin().

Right. Now what's being argued here is that instead of measuring an angle X, calculating the sine of X, and then (probably) rounding the result to a convenient decimal approximation, we should measure an angle X, round it to an angle Y with a convenient non-repeating decimal representation, and calculate the sine of Y. (That's the whole point of Mansfield's and Wildberger's analysis of the tablet; that it was a trig table that only gave answers for angles with convenient answers, rather than, as modern trig tables do, giving it for all angles.)

So instead of measuring an angle as 29.88 degrees, calculating the sine of 29.88 as 0.49818510533, then rounding to 0.4982 or whatever, we should instead calculate the sine of 30 degrees, and get the wonderful totally accurate "exact fraction" 1/2.

1/2 is totally accurate representation of the sine of 30 in a way that 0.4982 is not a totally accurate representation of the sine of 29.88, yes... But 0.4982 is a much more accurate representation of the angle you've actually measured.

From an engineering point of view (which offhand seems like the only one where accuracy matters), normal trig is obviously, obviously better than rational trig, because normal trig is more accurate in the ways that matter. The more sigfigs I have in my measurement of my angle, the more decimal places I can leave in my numerical approximation of the answer. It may always be inexact in a way that 1/2 is not, but it'll also always be exact in a much more important way. :)

> Such as? 60 has more prime factorizations than 10

So it does, but that's not the claim being made. Rather, the claim was: "We count in base 10, which only has two exact fractions: 1/2, which is 0.5, and 1/5."

To which one might note that:

1. All fractions are exact, by definition. 1/3 is an exact fraction; it's exactly 1/3, in exactly the way 1/2 is exactly 1/2. The fact it's decimal representation is repeating does not impact this.

2. Mansfeld apparently means "fractions with terminating decimal representations" when he says "exact", which is a weird and non-standard usage. But even so, you can construct tons of fractions in base 10 that have non-repeating decimal representations, like 2/5ths, or 5/8th.

3. Possibly he means "...which only allows you to construct two fractions using a numerator of 1 and a denominator consisting of a number smaller than the size of the base which has non-repeating decimal representations..." (which would be a pretty weird thing to focus on) it's still wrong; it's missing, eg, 1/4th.

4. Finally, he reckons that in base 60, 7/60 + 30/3600 aka 1/8 aka 0.125 is an "exact fraction". That sort of factorization is legitimate, but obviously if that's an exact fraction so is 2/10 + 5/100 aka 1/4th. Or come to that, 6/10 aka 0.6.

In short, the claim is gibberish. It's using a phrase with no clear definition in a way which is internally inconsistent. There is no way that 1/8th is an "exact fraction" in base 60, but only 1/2 and 1/5 are "exact fractions" in base 10.

(Also, you're using the word "irrational" wrong.)

Re:Don’t Fall for Babylonian Trigonometry Hype by adrianratnapala on Tuesday August 29, 2017 @08:28PM (#15128783)
I agree it's absurd just say that the rational trig system is "more accurate" and leave it at that. The idea that we have, for thousands of years, been ignoring mathematical wisdom of the ancient Babylonians is pure click-bait. But the issue goes beyond the maths itself and into what humans want to do with it.

Let's start with an apparent nitpick. You say "rather than, as modern trig tables do, giving it for all angles". But no table gives all angles, it's always sample. For modern tables, the samples tend to be regularly spaced, while the Babylonians apparently chose to sample the rational points. Which is better likely depends on the use case.

It's not obvious that "normal trig" is better from an engineering point of view. At least not for all engineers. If you are designing a Babylonian temple then you have the freedom to make your rooms so-many-cubits by so-many. That is, it's fairly easy to make rational ratios between the opposite. It's then handy to know what mathematical properties the resulting angle has. Or else to be able to look at your table and pick ratios that have some useful property. You could not do this with a "normal" trig table, or even a modern a hand calculator.

Re:Don’t Fall for Babylonian Trigonometry Hype by Lazare on Tuesday August 29, 2017 @09:45PM (#15129107)
> You say "rather than, as modern trig tables do, giving it for all angles". But no table gives all angles, it's always sample

That's true, and my wording was poor. But during the heyday of trig tables, they were very thorough, giving you results for angles (typically) very, very close to whatever you were trying to calculate, and to usefully high number of decimal places. (I'm old enough - just - that I actually used them in school.)

But more to the point, we don't use trig tables any more, we calculate the number on the fly to any arbitrary desired degree of accuracy. That's always going to be the best choice; there's no tradeoff here.

> If you are designing a Babylonian temple then you have the freedom to make your rooms so-many-cubits by so-many.

Also quite true, but of course, no temple wall is exactly N cubits high; the measured height is at best an approximation, so the resulting ratio of height to width (or whatever) is at best an approximation. All we need from our trig tables (or calculator) is enough accuracy. And in practice, that's not hard.

The reality is that, as the linked article says, "it seems like a solution to a problem that doesn’t exist". When we actually used trig tables to build bridges, we didn't have issues with trig tables, and now we have a much better solution. Trig tables that, as you put it, sample the rational points just doesn't seem like it's better for any use case.

Re:Don’t Fall for Babylonian Trigonometry Hype by jacobolus on Wednesday August 30, 2017 @04:17AM (#15130522)
In modern times the best solution is to usually never bother with angle measure, and just stick to pure vectorial methods.

If you happen to need an angle measure for whatever reason (e.g. interacting with legacy systems) you can then compute it to however many binary digits are appropriate for your needs.

Re:Don’t Fall for Babylonian Trigonometry Hype by AnimalMuppet on Tuesday August 29, 2017 @07:06PM (#15128359)
OK, as a purely useless concession, I will grant you that base 60 gives you more rational numbers that you can express as terminating decimals. (Uh, not decimal decimals, but... whatever the right term is.) But, first, every rational number is exactly representable in any base (as a fraction, rather than as a decimal expansion). Second, this doesn't help you at all if you're taking trig functions of almost all angles, where the result is not rational.
Re:Don’t Fall for Babylonian Trigonometry Hype by chroem- on Tuesday August 29, 2017 @07:20PM (#15128452)
>But, first, every rational number is exactly representable in any base (as a fraction, rather than as a decimal expansion).

Fractions are great until you actually need to evaluate them to use their value. Saying that any number can be perfectly represented with fractions is much like saying that any integral calculation can be performed by simply writing a tall S in front of an algebraic expression. You still have to calculate the final result.

>Second, this doesn't help you at all if you're taking trig functions of almost all angles, where the result is not rational.

That's just it though: we have no closed form way of calculating the values of trigonometric functions. We only have algorithms that describe how to approximate their values with acceptable amounts of error.

Re:Don’t Fall for Babylonian Trigonometry Hype by jdmichal on Tuesday August 29, 2017 @07:29PM (#15128499)
> Fractions are great until you actually need to evaluate them to use their value.

What does this even mean? Fractions are already a value, or rather they are a representation of a value. The same as the decimal number 25 is a representation of 2×10¹ + 5×10⁰.

Re:Don’t Fall for Babylonian Trigonometry Hype by chroem- on Tuesday August 29, 2017 @07:37PM (#15128548)
>Fractions are already a value, or rather they are a representation of a value. The same as the decimal number 25 is a representation of 2×10¹ + 5×10⁰.

That evaluates exactly to 25. Now try to pour me a glass containing exactly 1/7 gallons of milk without making an approximation.

Re:Don’t Fall for Babylonian Trigonometry Hype by Lazare on Tuesday August 29, 2017 @08:07PM (#15128685)
> Now try to pour me a glass containing exactly 1/7 gallons of milk without making an approximation.

This is an exceptionally silly argument. Now, I happen to live somewhere where the metric system in use, so allow me to translate your challenge. So you're saying that it's harder to pour 540.773 ml of milk (ie, 1/7th of a gallon) than 757.082 ml of milk (ie, 1/5th of a gallon)? (Notice how both of those are numerical approximations? How strange...)

There's nothing harder or easier about pouring 757.082 ml compared to 540.773 ml, nor do we have some magical pouring tools which allow one number to be poured with greater or lesser accuracy than the other. Nor does it suddenly become possible to pour it with more accuracy if you use a measuring cup with ounces on it. :)

You seem to be under the hilarious misapprehension that it's somehow easier to pour something if you happen to be measuring it in units that happen to have a non-repeating decimal representation in whatever base you happen to be working in. That's not really how reality works.

(And I'm not even going to start on what "exact" means when dealing with a non-molecularly homogenous fluid.)

Real world examples are not going to help your argument here, because the real world can only be interacted with via approximations. 1/7th of a gallon of milk is every bit as much of an approximation as 25 gallons.

Re:Don’t Fall for Babylonian Trigonometry Hype by jdmichal on Tuesday August 29, 2017 @07:46PM (#15128586)
Is such a task meant to be impossible? I don't even... I can assure you that it is, in fact, physically possible for a glass of milk to contain exactly 1/7 a gallon of milk.

I assume your "cleverness" is in the assertion that I cannot "prove" 1/7 of a gallon using existent tools because such tools would report the result in a base-10 decimal, which would be necessity have to be approximated because 1/7 is non-terminating in base-10.

Of course, I could instead prove it by weight. Or by combining 7 such equal portions and resulting in a single gallon. The latter being an example of exactly why fractional representation of rational numbers is useful.

EDIT: As an aside, by any chance are you one of the set of people who argue that .99999999... repeating infinitely is not the same value as 1?

EDIT2: This just reminded me a lot of the barometer question, as I think of various ways I could demonstrate 1/7 a gallon. Of course, some things are off the table due to being a heterogeneous substance at the molecular level. Some additional options would be on the table if it were homogeneous, like water.

https://en.wikipedia.org/wiki/Barometer_question

Re:Don’t Fall for Babylonian Trigonometry Hype by AnimalMuppet on Tuesday August 29, 2017 @08:32PM (#15128798)
Pour me a glass containing exactly 1/6 of a gallon of milk. Now pour me a glass containing exactly 1/6 of a gallon of milk, but using base 60. How does that help?

(Yes, what helps is having a measuring device calibrated with markings for the amount you're trying to pour. But I have several measuring cups that have markings for 1/3 cup, even though there is no exact base-10 representation of that fraction.)

Re:Don’t Fall for Babylonian Trigonometry Hype by yongjik on Tuesday August 29, 2017 @07:44PM (#15128576)
I'll pour you exactly 1/7 gallon of milk if you pour me exactly 25 gallons.

* Hell, wait, what am I going to do with 24 6/7 gallons of milk?

Re:Don’t Fall for Babylonian Trigonometry Hype by mcguire on Tuesday August 29, 2017 @09:03PM (#15128929)
It is indeed much easier to pour 8/60 + 34/3600 gallons of milk.