That's cool. Qalculate is great software.
I like the built-in #IEEE754 (the common floating-point format) converter.

I forgot you can invoke it with qalc. I've been using calc.
@robpike @rsc Closest to the dirt here I got was proposing to implement #IEEE754 #DFP on a #Cavium #Octeon substrate for front-running #financial exchange orders. I didn't do it. But I thought it.
🌘 直接比較浮點數其實沒問題:別再盲目迷信微小量(Epsilon)比較了
➤ 打破精確度的迷思:從確定性邏輯重新審視浮點數運算
https://lisyarus.github.io/blog/posts/its-ok-to-compare-floating-points-for-equality.html
在程式開發領域,許多工程師被告誡「絕不可直接比較浮點數是否相等」,而必須使用微小誤差值(Epsilon)來進行模糊判斷。然而,擁有超過 15 年圖形與物理模擬開發經驗的作者挑戰了這項傳統觀念。他指出,浮點數並非隨機且不可預測的「黑盒子」,而是高度標準化且具備確定性的系統。盲目套用 Epsilon 補丁往往只是治標不治本的權宜之計,甚至會因破壞比較的「傳遞性」而導致更難追查的系統性錯誤。本文透過網格運動的實例,分析為何我們應該回歸問題本質,從邏輯層面優化程式碼,而非依賴粗糙的誤差範圍。
+ 這篇文章說到了痛點!以前我也常因為不同模組用了不同大小的 epsilon,導致幾何演算法在邊界狀況下崩潰,追 Bu
##軟體開發 #程式設計 #浮點數 #IEEE754 #遊戲開發 #演算法
It's OK to compare floating-points for equality

lisyarus blog

The existence of Godzilla Minus Zero implies the existance of:

* Godzilla Plus Infinity
* Godzilla Minus Infinity
* Denormalized Godzilla
* Godzilla NaN

https://www.youtube.com/watch?v=n-NDYWPXpKg

#godzilla #godzillaMinusZero #toho #shinGodzilla #nan #ieee #ieee754

GODZILLA MINUS ZERO | First Look Teaser

YouTube

RISC-VではF拡張にFMIN.S / FMAX.Sがあり、IEEE 754-2019のminimumNumber / maximumNumberに相当する。また、Zfa拡張にFMINM.S / FMAXM.Sがあり、minimum / maximumに相当する。

また、D拡張を実装していればFMIN.D / FMAX.Dが、D拡張とZfa拡張を実装していればFMINM.D / FMAXM.Dが、Q拡張を実装していればFMIN.QとFMAX.Qが、Q拡張とZfa拡張を実装していればFMINM.QとFMAXM.Qが、Zfh拡張を実装していればFMIN.H / FMAX.Hが、Zfh拡張とZfa拡張を実装していればFMINM.H / FMAXM.Hがある。

(古い実装ではFMIN.*とFMAX.*がIEEE 754-2008のminNum / maxNumに相当する。実機を色々集めてどちらの実装になっているか確認するのも少し面白そう。)

(2020-05)浮動小数点数の min / max #IEEE754 - Qiita
https://qiita.com/mod_poppo/items/41a09bd40acfceec6ec8

浮動小数点数の min / max - Qiita

多くのプログラミング言語には、「2つ以上の数値が与えられた時、その最小値あるいは最大値」を返す関数 (min / max) が用意されている。入力が整数や有理数であれば難しい話はないのだが、対象が浮動小数点数の場合は厄介な問題が起こる。具体的には、「NaN の扱い」と「0 ...

Qiita

Might publish a blog or two in a few weeks about my work with OpenFOAM, different profilers, and an implementation of an LBM CFD kernel on RISC-V with POSITS.

What a great company to be working for. Learning so much!

#posit #RISCV #cfd #openfoam #lbm #cfd #scientificcomputing #profiler #Linux #blog #technicalblog #ieee754 #calligotech

I just released decimal-java 2.0.1, https://github.com/FirebirdSQL/decimal-java/releases/tag/v2.0.1. Decimal-java is a library to convert java.math.BigDecimal to and from IEEE-754r (IEEE-754-2008) decimal byte representations.

Compared to decimal-java 2.0.0, this version adds JSpecify nullability annotations.

#decimal #ieee754 #java

Release decimal-java 2.0.1 · FirebirdSQL/decimal-java

Minor changes: Upgraded to Gradle 9.3.1 Upgraded to JUnit 6.0.3 Added JSpecify nullability information Requirements: Java 17 or higher Also available on Maven: <dependency> <groupId>org.fireb...

GitHub

@linuxgal

Note that this isn't Python-specific behaviour. This is required by the IEEE-754 floating-point standard, which Python (and most other runtimes) conform to.

NaN, Inf, -Inf, comparison rules, exceptions ... it's all in there.

#Python #IEEE754 #FloatingPoint #math #standard