<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: simonbyrne</title><link>https://news.ycombinator.com/user?id=simonbyrne</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 11 Sep 2026 01:36:30 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=simonbyrne" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by simonbyrne in "State of Machine Learning in Julia"]]></title><description><![CDATA[
<p>If that's seriously what you're looking for, you should really consider Fortran. There is a reason it is still very widely used in scientific domains.</p>
]]></description><pubDate>Wed, 12 Jan 2022 16:57:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=29909394</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29909394</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29909394</guid></item><item><title><![CDATA[New comment by simonbyrne in "Floating point visually explained (2017)"]]></title><description><![CDATA[
<p>You can just wrap the literal in a conversion function, eg Float32(0x1p52), which should get constant propagated at compile time.</p>
]]></description><pubDate>Sun, 28 Nov 2021 20:05:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=29372400</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29372400</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29372400</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>That's fascinating thread, thanks:
<a href="https://github.com/WebAssembly/design/issues/148" rel="nofollow">https://github.com/WebAssembly/design/issues/148</a></p>
]]></description><pubDate>Sat, 13 Nov 2021 21:22:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=29213280</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29213280</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29213280</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>Do you know what happens when you have ops with different flags? e.g. if you have (a + b) + c, where one + allows reassoc but one doesn't?</p>
]]></description><pubDate>Fri, 12 Nov 2021 22:10:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=29205125</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29205125</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29205125</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>From personal experience, yes: I've seen multiple cases of scientists finding the ultimate cause of their bugs was some fast-math-related optimization.<p>The problem isn't necessarily the code they wrote themselves: it is often that they've compiled someone else's code or an open source library with fast-math, which broke some internal piece.</p>
]]></description><pubDate>Fri, 12 Nov 2021 20:33:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=29204191</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29204191</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29204191</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>I tried to lay out a reasonable path: incrementally test accuracy and performance, and only enable the necessary optimizations to get the desired performance. Good tests will catch the obvious catastrophic cases, but some will inevitably be weird edge cases.<p>As always, the devil is in the details: you typically can't check exact equality, as e.g. reassociating arithmetic can give slightly different (but not necessarily worse) results. So the challenge is coming up with appropriate measure of determining whether something is wrong.</p>
]]></description><pubDate>Fri, 12 Nov 2021 20:25:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=29204128</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29204128</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29204128</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>I'm not exactly sure what you're asking here, but the point is that "to machine precision" is relative: if f(x) and g(x) are O(1e200), then the absolute error of each is still O(1e185). However f(x)/g(x) will still be very accurate (with absolute error O(1e-15)).</p>
]]></description><pubDate>Fri, 12 Nov 2021 20:21:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=29204079</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29204079</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29204079</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>The key thing about floating point is that it maintains relative accuracy: in your case, if you have say f(x) and g(x) are both O(1e200), and are correct to some small relative tolerance, say 1e-10 (that is, the absolute error is 1e190). Then the relative for f(x)/g(x) stays nicely bounded to about 2e-10.<p>However if you do f(x) - g(x), the absolute error is on the order of 2e190: if f(x) - g(x) is small, then now the relative error can be huge (this is known as catastrophic cancellation).</p>
]]></description><pubDate>Fri, 12 Nov 2021 19:22:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=29203474</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29203474</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29203474</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>Herbie is a great tool, especially for teaching.</p>
]]></description><pubDate>Fri, 12 Nov 2021 19:01:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=29203222</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29203222</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29203222</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>In theory, every function should do that to check things like rounding mode etc. But that would be pretty slow, especially for low-latency operations (modifying mxcsr will disrupt pipelining for example).</p>
]]></description><pubDate>Fri, 12 Nov 2021 18:14:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=29202642</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29202642</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29202642</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>-ffp-contract=fast will enable FMA contraction, i.e. replacing  a * b + c with fma(a,b,c). This is generally okay, but there are a few cases where it can cause problems: the canonical example is computing an expression of the form:<p>a * d - b * c<p>If a == b and c == d (and all are finite), then this should give 0 (which is true for strict IEEE 754 math), but if you replace it with an fma then you can get either a positive or negative value, depending on the order in which it was contracted. Issues like this pop up in complex multiplication, or applying the quadratic formula.</p>
]]></description><pubDate>Fri, 12 Nov 2021 18:01:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=29202468</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29202468</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29202468</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>My point isn't that fast-math isn't useful: it very much is. The problem is that it is a whole grab bag of things that can do very dangerous things. Rather than using a sledgehammer, you should try to be selective and enable only the useful optimizations, e.g. you could just enable -ffp-contract=fast and -fno-math-errno.</p>
]]></description><pubDate>Fri, 12 Nov 2021 17:53:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=29202349</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29202349</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29202349</guid></item><item><title><![CDATA[New comment by simonbyrne in "Beware of fast-math"]]></title><description><![CDATA[
<p>Not necessarily: if your cospi(x) function is always returning 1.0 (<a href="https://github.com/JuliaLang/julia/issues/30073#issuecomment-439707503" rel="nofollow">https://github.com/JuliaLang/julia/issues/30073#issuecomment...</a>), but you wrote your code assuming the result was in a different interval, then you could quite easily invoke undefined behavior.</p>
]]></description><pubDate>Fri, 12 Nov 2021 17:47:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=29202291</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29202291</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29202291</guid></item><item><title><![CDATA[Beware of fast-math]]></title><description><![CDATA[
<p>Article URL: <a href="https://simonbyrne.github.io/notes/fastmath/">https://simonbyrne.github.io/notes/fastmath/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29201473">https://news.ycombinator.com/item?id=29201473</a></p>
<p>Points: 189</p>
<p># Comments: 107</p>
]]></description><pubDate>Fri, 12 Nov 2021 16:53:06 +0000</pubDate><link>https://simonbyrne.github.io/notes/fastmath/</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=29201473</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29201473</guid></item><item><title><![CDATA[New comment by simonbyrne in "U.S. Officials in Germany Hit by Havana Syndrome"]]></title><description><![CDATA[
<p>> But then people latched on to the idea that it was caused by some kind of sonic device or hitherto unknown weapon targeting embassies.<p>Possibly prompted by historical precedent: <a href="https://en.wikipedia.org/wiki/Moscow_Signal" rel="nofollow">https://en.wikipedia.org/wiki/Moscow_Signal</a></p>
]]></description><pubDate>Wed, 18 Aug 2021 15:17:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=28222321</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=28222321</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28222321</guid></item><item><title><![CDATA[New comment by simonbyrne in "The Floppy Disk of Floating Point"]]></title><description><![CDATA[
<p>One of the interesting things about the 80-bit format was that allowed the use of 64-bit integers on a 16 or 32-bit machine. This was what Thomas Nicely was using them for when he found the Pentium FDIV bug: <a href="https://faculty.lynchburg.edu/~nicely/pentbug/pentbug.html" rel="nofollow">https://faculty.lynchburg.edu/~nicely/pentbug/pentbug.html</a></p>
]]></description><pubDate>Tue, 14 Jul 2020 18:13:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=23835560</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=23835560</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23835560</guid></item><item><title><![CDATA[New comment by simonbyrne in "JuliaLang: The Ingredients for a Composable Programming Language"]]></title><description><![CDATA[
<p>> or wait for optimizations to be done, e.g have pandas, numpy etc handle multi-core processors etc ?<p>All those exist already. Indeed, other than DataFrames.jl (the pandas equivalent) they are part of the language itself.</p>
]]></description><pubDate>Mon, 10 Feb 2020 20:21:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=22292834</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=22292834</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=22292834</guid></item><item><title><![CDATA[New comment by simonbyrne in "The Floating-Point Guide (2010)"]]></title><description><![CDATA[
<p>I disagree about practical and accessible:<p>- its exposition is complicated (trying to prove everything in a general base makes it difficult to understand)<p>- it's woefully out of date (lack of guard digits haven't been an issue for at least 25 years, extended precision hasn't been an issue for the past 10 or so, and most languages now default to having fairly strict floating point semantics)<p>- it gets bogged down in irrelevant minutiae (rounding modes and exception flags, while  available in modern hardware, aren't really supported by any modern languages/compilers)<p>- it doesn't really provide any practical advice (it barely mentions binary-decimal conversion, it jumps to doubling precision and Kahan summation without suggesting any intermediate steps such as sorted or pairwise summation).<p>But my biggest complaint is the frequency with which users are referred to it on StackOverflow as if (1) it is a good way to learn about floating point concepts, and (2) anyone using floating point numbers should be expected to understand it all.</p>
]]></description><pubDate>Thu, 21 Nov 2019 17:52:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=21597064</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=21597064</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21597064</guid></item><item><title><![CDATA[New comment by simonbyrne in "My years working on black programs"]]></title><description><![CDATA[
<p>Deep learning is the obvious answer: 10 years ago it was largely confined to a small number of research groups and niche conferences.</p>
]]></description><pubDate>Wed, 20 Nov 2019 05:58:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=21581430</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=21581430</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21581430</guid></item><item><title><![CDATA[New comment by simonbyrne in "The Floating-Point Guide (2010)"]]></title><description><![CDATA[
<p>Thank you! The Goldberg article is a terrible way to learn about floating point, and the frequency with which it is referred to on StackOverflow is really disheartening.</p>
]]></description><pubDate>Tue, 19 Nov 2019 17:46:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=21575799</link><dc:creator>simonbyrne</dc:creator><comments>https://news.ycombinator.com/item?id=21575799</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21575799</guid></item></channel></rss>