1
0
mirror of https://github.com/golang/go synced 2024-11-07 17:46:23 -07:00
go/api/next
Akhil Indurti 3348fd0ec9 math: add Compare and Compare32
This change introduces the Compare and Compare32 functions
based on the total-ordering predicate in IEEE-754, section 5.10.

In particular,
* -NaN is ordered before any other value
* +NaN is ordered after any other value
* -0 is ordered before +0
* All other values are ordered the usual way

Compare-8    0.4537n ± 1%
Compare32-8  0.3752n ± 1%
geomean      0.4126n

Fixes #56491.

Change-Id: I5c9c77430a2872f380688c1b0a66f2105b77d5ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/467515
Reviewed-by: WANG Xuerui <git@xen0n.name>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-02-15 21:56:30 +00:00
..
25448.txt runtime: replace panic(nil) with panic(new(runtime.PanicNilError)) 2023-01-19 22:21:50 +00:00
54386.txt bytes, strings: add ContainsFunc 2023-01-24 22:06:45 +00:00
55002.txt reflect,runtime: add Value.Clear 2023-01-30 16:00:58 +00:00
55079.txt all: upgrade Unicode from 13.0.0 to 15.0.0 2023-02-06 04:29:53 +00:00
56491.txt math: add Compare and Compare32 2023-02-15 21:56:30 +00:00
56661.txt context: add APIs for setting a cancelation cause when deadline or timer expires 2023-01-20 21:41:01 +00:00
56887.txt debug/elf: add DT_FLAGS_1 constants 2023-02-03 04:37:17 +00:00
56984.txt math/big: add Int.Float64 conversion 2023-02-02 19:39:34 +00:00
57237.txt encoding/binary: add var NativeEndian 2023-01-27 18:17:20 +00:00
57433.txt slices: new package 2023-02-13 21:00:42 +00:00
57436.txt maps: new package 2023-02-03 18:22:53 +00:00
57708.txt go/token: add (*File).Lines method 2023-02-02 16:40:29 +00:00