Hacker Newsnew | past | comments | ask | show | jobs | submit | wyager's commentslogin

> the derivative (with respect to x) of sin(x) is cos(x), regardless of units for x.

Not if you use "turn"-trigonometric functions, as the author suggests.

turn-sin `t sin(x) = sin(2pi * x)` has `d/dx tsin(x) = 2pi * tcos(x)`.


such a weird thread because everyone seems to know what they are talking about but definitely seem to miss something.

but basically one would be differentiating to 2pi x rather than x. and things will work out


> For graphics rendering Euler equation doesnt matter.

Huh?? "Euler angles" are one of the most popular representations in computer graphics! The only other good alternative is quaternions, where as you say this also matters!


Yes, but do you really need to scale all your values to make the rotation amount fit into a sin() call, only to have to scale them back again when you're done?

I think what they're getting at is "why are we scaling everything so one full turn is sin(6.28ish) when we can just say sin(1)?"

You could easily try it out by defining a function that replaces sin(), cos(), and tan() with their "turn" equivalents, and seeing how you get on.


Euler angles have nothing to do with e^ix = cos x + i sin x. They are a completely different concept.

I am very familiar :) using euler angles involves using trig functions, which is what this thread is about

Yes and no. The x in e^ix is to SO(2) what Euler angles are to SO(3).

This really only says that the connection between Euler's formula and Euler angles is that they're both angles. I would agree with that.

One represents rotation in 2D space, the other in 3D. So I think it's a bit more than that.

> The author's not talking about doing math, but about porting math into code.

If your code doesn't look like the math it's "ported" from, the odds of it being bad code go up like 100x


I tried to make my code exactly match the math it came from, but I didn’t have enough memory to store sqrt(2)

If you look at the implementation of sqrt for a computer, it's usually implemented with Newton's algorithm, which is an iterative numerical method with high speed convergence. It is computationally efficient and looks approximately zero how √ looks.

Right. I was hoping to highlight that difference with a joke.

Sometimes a person will tell a story which is untrue, with the purpose of bringing levity to a conversation. This may be termed a joke. These stories may also be used to illustrate a point.

It's important to note that such cases are not always clearly signaled as being humor or untrue. It is a part of the joke's effect that the reader or listener will not at first know it is a joke, but will realize it after noticing an absurdity.

A related concept is "dry humor".


It is important that they not be clearly signaled.

What? "sqrt(2)" is literally 7 bytes. :)

I’ve been writing code for 46 years. Not once have I had to code a derivative.

And for all the people who are concerned about how sin' 2πx = 2π cos 2πx, in actual code, it doesn’t matter. Let’s say that I’m writing a basic graphing function and I want to be able to display the slope of the sin curve at any point.

I am not going to expose the turn-based units to the user. Caring about slopes implies that I’m doing calculus and thus assuming radians. So even though my internal values are [0,1], I will label them as [0, 2π] (and the actual numeric values on the display may actually be something like [50,450] which is yet another numeric value we don’t display). So to get the slope at π/4, I’ll calculate cos_t 0.125 and display that value.

We do all kinds of unit translations in computing without worrying about it. This is just another case of that which observes that numerically speaking, using turns is better aligned with the underlying numerical algorithm for calculating trig values.


> I’ve been writing code for 46 years. Not once have I had to code a derivative.

Haha !

I have been coding for much shorter time but having done some ML on orientations and on spheres in my time, I have had to take their derivatives all the time.

It will be interesting to consider folks who do machine learning on robot trajectories or analysing dynamics of robotic arms.


> Caring about slopes implies that I’m doing calculus

You could be using the results of calculus, which became frazzled with gratuitous constants because of poor angle units before anyone wrote any code.

You want to keep all the math in radians until you code the calculations; then figure out how to optimize it with turns where possible.


> I’ve been writing code for 46 years. Not once have I had to code a derivative.

It sounds like discussions about "porting from math" do not pertain to you then?


> Do not deserialize untrusted data.

I think the better lesson is "use safe codecs"


> But ask them to enumerate all the intermediate steps required to create a formal direct proof, and it will loose attention and forget important details as they go out of their input window size.

It's interesting how people will comment on LLM capabilities despite clearly not having engaged with frontier models in any meaningful way in a long time

Having models write Lean proofs of mathematical claims is standard operating procedure for any LLM math discovery!


Yeah but the LLM can only handle proofs that hold inside its context window. Proofs for novel theories requiring thousands of pages with dozen millions of steps will need support from external tools to organize the full structure of the formal document; it cannot be done by the LLM inference process alone, which was my point. It would be like asking a mathematician to proof theorems without pen and paper; external tooling is a must, the statistical essential nature of generating content from weights is 1) error prone and 2) not suitable for chains of systematic reasoning that are longer than the attention span.

The proofs will be only as good as the framework for linking successive instances of reasoning.


Not sure how true this restrictions is once you have the agents hammering on at a big code base of formalised proofs.

Proofs stretching thousands of pages are split into lemmas, grouped into sub theories.

What I haven’t seen agents do yet is to develop new ideas for entire such theories. I have usually seen them bite into some existing idea and grinding out related results. But I am less sure than ever that they won’t!


The thread title is "What sort of maths are LLMs good at?"

The codebase you describe would be an external tool in GP's conception.


If I walked outside, I would also be an external tool. So, I don't.

Every LLM harness released in the last year has handled this gracefully via delegation, structured memory systems, etc.

Can someone who works in commercial web dev explain how companies even end up with this much crap pulled into their websites?


When you try to maximize ad revenue, you add multiple advertising SDKs to your website, each of which can often do live bidding with hundreds of ad/data brokers

You can usually check the ads.txt file on a website to see which companies are allowed to bid for ad space on there. For example, for dict.cc, the website in question:

https://dict.cc/ads.txt

The ones labelled "RESELLER" will probably share your data with even more ad companies.


How have I not heard about this. I am both impressed and horrified.


I am one of those.

It generally goes like this:

When we launch a site it is seldom more than perhaps Hotjar, Google Analytics, and two-three other services connected.

And then through the years product managers and other stakeholders gets sold on adding LinkedIn, Instagram, Meta, and so on. So we add those.

Next a specific service ”to better track the sales funnel from in-store salespeople to the web” gets added. Then another ”analyse the data quality versus bounce rate” tracker gets added. And so on.

Before long the developers have streamlined the process of adding new scripts/analytics/trackers that editors can add them on their own, and that is when the floodgates open.


two main sources

analytics: A/B testing, "if x does user click y"?, unique page visits, etc.

ads: integrating with an ad provider comes with hundreds of trackers, because they want to - know if you bought a product after clicking on an ad - show you targeted ads for shoes after you googled shoes - build a profile of you (age, gender, location, profession) to show relevant ads across different websites


Likely has little relationship to what is actually in the page. They had to do GDPR, didn't or couldn't spend a lot of time on it -- or had an especially conservative corporate counsel -- and ended up just getting a list of every company they've ever worked with, for any reason, "to be safe".

For most companies this can easily be thousands of partners, and going through that list and figuring out exactly who might get data in reality, through every possible permutation of workflow, is a horrendously expensive proposition.

You might be surprised how many well-meaning regulations leave even the best-intentioned implementers in an impossible situation.


Oh yeah, that combination of fear and lack of knowledge probably plays a big part. I was once involved with creating a privacy policy for a B2B(!) web application. What a farce. In the end, the process was cut short (counsel too expensive and not nearly familiar enough with tech). The resulting document was at least 50 % stuff the app simply does not do.


> or had an especially conservative corporate counsel

And once again we shall see how being conservative sounds like it might save you money but costs you dearly in the long run.


Yeah, but again, see the other part of what I wrote -- doing it "right" can be insanely expensive, and so you get an incentive to be conservative.


I read what you wrote.

Ultimately that is what they are having to do though, it's just costing them twice as much by pretending that being conservative and not actually looking at the problem saved them.


Advertisement.


The averaged-over-usage-lifetime software quality for things like cars or video games is worse today than it was before OTA updates

Arguably the peak quality after a few months/years of fixes is better, but that doesn't really matter because usage is front-loaded


I remember my parents needing to buy very expensive map DVD disks in order to update the car’s navigation system to update their car’s navigation computer.

The disks were very expensive and if you didn’t update them it wouldn’t know about new roads (slower trip, missed turns, etc).


That's why we have Android Auto: move the updates to a thing that already has frequent Internet connection, and if the update goes wrong it's clearly the fault of this other company, plus the car itself still works fine.

Jeep already had an OTA the broke the ability for the car to be driven.


Did those updates ever break the navigation software?


I've had map update packages brick head units before, yes. Largely because they also shipped some software updates in that map update package.


> EU funding brought fiber to my farm area

Yes, boondoggle subsidies allow you to un-economically bring fiber to a subset of random places. I say this as the beneficiary of one such boondoggle. It doesn't scale well


> the very architects of AI are the people whose jobs are most easily automated by AI

Think very hard about what this implies for the future pace of AI R&D


It's going to turn into slop, exponentially fast, any moment now.

No but seriously it could imply grinding to a halt, turning into a laughing stock of slop, or, imho much less likely given the current state of AI (barring huge technological breakthrough and a couple of other assumptions) you were probably implying an intelligence explosion.


There's a company in Austin that uses sound for drone localization, although I forget the name


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: