[DiscordArchive] can we please first agree on one definition of what an `fp_6_9` is before we discuss optimizations?
[DiscordArchive] can we please first agree on one definition of what an `fp_6_9` is before we discuss optimizations?
Archived author: schlumpf • Posted: 2018-06-05T13:04:53.786000+00:00
Original source
Anyway. If I understood the above stuff correctly, and since you didn't object to my assumptions about t he formula, https://godbolt.org/g/Huk9Ha disagrees about it being correct: On a 16 bit `1:6:9` number, `1 << 15 | 1 << 9` should be equivalent to `-1.f`.
The output of the program is
```
1 1 1 1
-1 -1 65 -63
```
[Embed: Compiler Explorer]
Compiler Explorer is an interactive online compiler which shows the assembly output of compiled C, C++, Rust, Go, D, Haskell, Swift & Pascal code.
https://godbolt.org/g/Huk9Ha
Archived author: Deamon • Posted: 2018-06-05T13:04:57.761000+00:00
Original source
while normal people use additional code
Archived author: schlumpf • Posted: 2018-06-05T13:05:59.124000+00:00
Original source
Please correct me about my implementation of `f2` and `f3` based on your messages being wrong, or tell me why `f1` is wrong.
Archived author: schlumpf • Posted: 2018-06-05T13:06:12.258000+00:00
Original source
Note how the claim "should be equivalent to just dividing" is wrong as seen here.
Archived author: Deamon • Posted: 2018-06-05T13:07:56.856000+00:00
Original source
yes, it's not just dividing, sadly
Archived author: schlumpf • Posted: 2018-06-05T13:09:02.668000+00:00
Original source
that explains `f3` being wrong. what about `f2`?