This comment is hidden because it contains spoiler information about the solution
my brain says 'you know what, let\'s go golfing, except instead of code golf, it's code pachinko' :3
aaaaa I don't understand my brain says 'no' lol
rounded to 4 decimals
That's generally a very bad idea. Tests for all translations should use equals with delta (say, 1e-3): that will make it compatible with existing solutions, but also will get rid of the usual problems when working with floating-point numbers.
1e-3
what 0_0
a = {2680, 7880}, b = {9062, 4467}, c = {4982, 6348} expected {5574.6666999999998 ± 1e-04, 6231.6666999999998 ± 1e-04} got {5574.6665999999996, 6231.6665999999996}
I mean the difference is 1e-4...
wow I didn't even know this one exists 0_0 nooice
yes it is. the correct way to do it is via either union type punning, or memcpy()
union
memcpy()
this is technically UB
check out the comment below by haadam from 7 years ago
haadam
please show how it is derived
Please add info how the arguments are passed, in nasm... :)
Loading collection data...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
my brain says 'you know what, let\'s go golfing, except instead of code golf, it's code pachinko' :3
aaaaa I don't understand my brain says 'no' lol
That's generally a very bad idea. Tests for all translations should use equals with delta (say,
1e-3
): that will make it compatible with existing solutions, but also will get rid of the usual problems when working with floating-point numbers.what 0_0
a = {2680, 7880}, b = {9062, 4467}, c = {4982, 6348}
expected {5574.6666999999998 ± 1e-04, 6231.6666999999998 ± 1e-04}
got {5574.6665999999996, 6231.6665999999996}
I mean the difference is 1e-4...
wow I didn't even know this one exists 0_0 nooice
yes it is. the correct way to do it is via either
union
type punning, ormemcpy()
this is technically UB
check out the comment below by
haadam
from 7 years agoplease show how it is derived
Please add info how the arguments are passed, in nasm... :)