Repository navigation
v0.7.1
This release fixes the results of okage on arm64 and s390x, and the tests on 32-bit platforms.
go get github.com/xo/okage@v0.7.1The same results on arm64 and s390x
On arm64 and s390x, the Go compiler fuses a multiply and an add into one instruction, even across statements. The fused result can differ in the last bit from the result on amd64, where the compiler does not fuse. okage requires the same results on each platform (D16), so each product that feeds an add is now rounded first, with an explicit float64 or float32 conversion. The fault was in these places:
internal/crmath: the double-double arithmetic of sin, cos, tan, atan2 and pow. An unrounded product broke the arithmetic, so some results differed in the last bit, such aspow(2, 10), which gave 1023.9999999999998. The transforms ofsvguse these functions.internal/kurbo:SolveCubic,SolveQuadratic, the products ofAffineand the ITP solver.- The cubic and quadratic solvers of
path64in the root package. svg: the offsets of the gradients of COLR glyphs, the lighting filters, the angles of markers, text on a path and the alignment of a view box.html: the layout of tables.lottie: the shapes, the easing, the repeaters, the trim paths, the gradient stops, and the effects of thePixmapSink.
The results on amd64 do not change. The calls of math.FMA that port mul_add of Rust stay fused, as Rust does.
32-bit tests
The test of Composition.Image compiles where an int has 32 bits, and internal/lottiecompat has a test, so that TinyGo builds a test program for each package for wasip1.