Skip to main content

Timeline for Floating Point XOR

Current License: CC BY-SA 4.0

47 events
when toggle format what by license comment
May 13, 2022 at 9:21 answer added chunes timeline score: 0
May 13, 2022 at 8:51 answer added MarcMush timeline score: 1
May 26, 2021 at 3:28 answer added NoLongerBreathedIn timeline score: 1
Jun 16, 2020 at 9:39 answer added l4m2 timeline score: 0
Sep 23, 2019 at 1:35 answer added Οurous timeline score: 0
Sep 17, 2019 at 18:40 answer added S.S. Anne timeline score: 2
Sep 17, 2019 at 7:48 comment added Peter Cordes @ReversedEngineer: For languages that support floating point, I think it's implied that you should use the language's native object-representation, whatever that is. (e.g. something equivalent to type-punning to integer and back). If the language doesn't support type-punning or XOR of FP data, then you have to implement it yourself using whatever FP representation your chosen implementation uses.
Sep 17, 2019 at 1:51 comment added R.. GitHub STOP HELPING ICE @HenningMakholm: That's not mathematically meaningful, unlike xor of float values which is addition of polynomials over Z/2Z.
Sep 17, 2019 at 1:49 comment added hmakholm left over Monica @R..: Take their representations as (infinite, repeating) binary fractions, XOR them bit by bit; find out what the result represents?
Sep 17, 2019 at 1:44 comment added R.. GitHub STOP HELPING ICE @HenningMakholm: Huh? These are floating point (diadic rationals) not arbitrary rationals. I don't even know what xor would mean on the latter.
Sep 17, 2019 at 1:43 comment added R.. GitHub STOP HELPING ICE @Mark: No, as written the question is just about xor'ing their representations, whatever those representations are. The result is dependent on the floating point format but the algorithm is always a single xor instruction on the representation, which is pretty boring.
Sep 17, 2019 at 1:38 comment added hmakholm left over Monica @R..: Indeed -- and then of course input and output should be given as exact fractions. (It may be assumed that the input fractions are in lowest terms and the denominators are not powers of two, so the binary representations are unique).
Sep 17, 2019 at 0:13 comment added Mark @R.., you're assuming 32-bit IEEE-734. XORing a pair of Microsoft Basic 40-bit floats is a bit more exciting.
Sep 16, 2019 at 20:38 answer added David Conrad timeline score: 2
Sep 16, 2019 at 19:58 answer added val - disappointed in SE timeline score: 1
Sep 16, 2019 at 19:12 answer added Eric Duminil timeline score: 1
Sep 16, 2019 at 18:25 answer added Sir_Lagsalot timeline score: 9
Sep 16, 2019 at 16:24 comment added Grimmy Do we have to handle infinity, subnormals, or negative 0, as either input or output?
Sep 16, 2019 at 14:33 comment added R.. GitHub STOP HELPING ICE This question would be more interesting as "xor the values" rather than "xor the representations". The latter is of course identical to "xor two 32-bit integers" in any language that lacks a type system or admits type punning, and thus is pretty boring...
Sep 16, 2019 at 14:13 answer added Sanchises timeline score: 2
Sep 16, 2019 at 14:00 answer added RBarryYoung timeline score: 5
Sep 16, 2019 at 12:42 comment added Grimmy Do we have to handle NaN input?
Sep 16, 2019 at 11:18 answer added nwellnhof timeline score: 2
Sep 16, 2019 at 10:41 answer added Sanchises timeline score: 3
Sep 16, 2019 at 10:07 comment added Reversed Engineer "binary representation" of a float is extremely ambiguous. You'll need to define which representation you're using. There are an infinite number of representations, including the finite number already used by life on this planet, some being more popular than others, such as IEEE 754
Sep 16, 2019 at 6:41 answer added polfosol ఠ_ఠ timeline score: 1
Sep 16, 2019 at 6:00 history tweeted twitter.com/StackCodeGolf/status/1173476706289618944
Sep 15, 2019 at 21:43 history became hot network question
Sep 15, 2019 at 20:23 answer added user555045 timeline score: 57
Sep 15, 2019 at 19:32 answer added Nick Kennedy timeline score: 6
Sep 15, 2019 at 17:47 comment added Adám That gives me 1.675075421658194e-309.
Sep 15, 2019 at 17:07 answer added Nick Kennedy timeline score: 6
Sep 15, 2019 at 16:48 answer added Gymhgy timeline score: 2
Sep 15, 2019 at 16:08 answer added Nick Kennedy timeline score: 12
Sep 15, 2019 at 14:51 comment added virchau13 I found the inputs that work with 8-byte floats (doubles) to produce an sNaN: 1.54234e+260 1.63233e-260 It doesn't throw an FPE on my system, though. Can you try it and see?
Sep 15, 2019 at 14:32 comment added Adám @virchau With the exactly right input, it should be possible to produce the representation of a sNaN, causing an error.
Sep 15, 2019 at 14:24 comment added virchau13 I don't think that's possible...? I just wrote a program to bruteforce 4-byte floats from 0 to UINT_MAX, and it didn't die anywhere. NaN is a valid output, if that's what you're asking.
Sep 15, 2019 at 14:24 answer added Adám timeline score: 5
Sep 15, 2019 at 14:17 history edited virchau13 CC BY-SA 4.0
added clarifications
Sep 15, 2019 at 14:13 comment added Adám What if the resulting bit pattern doesn't represent a valid float?
Sep 15, 2019 at 14:12 comment added virchau13 I would say no. I'll edit the question to clarify on what a "convenient method" is.
Sep 15, 2019 at 14:12 comment added Adám Why the lenient input format but stringent output format? How about Boolean list as output?
Sep 15, 2019 at 14:11 comment added Adám Does Boolean list count as a convenient method?
Sep 15, 2019 at 13:55 answer added Arnauld timeline score: 2
Sep 15, 2019 at 13:45 comment added Stephen Welcome to Code Golf! Could you provide some more test cases?
Sep 15, 2019 at 13:35 review First posts
Sep 15, 2019 at 13:46
Sep 15, 2019 at 13:33 history asked virchau13 CC BY-SA 4.0