14:48haasn: I'm surprised x = x * x; /* 5 times*/ is measurably faster than x = pow(x, 32.0)
14:48haasn: you would assume compilers could optimize such low hanging fruit
14:55arsenm: I bet it's wrong if you look close enough
14:59arsenm: seems to not underflow correctly
15:08haasn: ah, fair enough
15:08haasn: in context I definitely don't care about underflow so it's useful to keep in the back of my mind why the compiler isn't allowed to optimize some functions
15:25arsenm: for f32 seems to work for an exponent known between -29 and 26 but I'd need to figure out why exactly that seems to be the range
15:30haasn: on a side note, I thought GPUs ran with the equivalent of -ffast-math by default
15:30arsenm: that's a language choice
15:31arsenm: -ffast-math is too poorly defined
15:38arsenm: oh, it's just 5 * n > max_exp and 5 * n < min_exp
16:28haasn: seems like vulkan specifically mandates -ffast-math be on by default
16:29haasn: or something vaguely analogous to it, at any rate
16:31arsenm: i think spirv has fast math by default which is broken as hell
18:30airlied: spirv vulkan is glsl equiv spirv cl should have cl rules, not sure which is fast math
18:41arsenm: making it modal and part of the base properties of the representation isn't really better
18:53airlied: agree, just pointing our saying spirv isnt sufficient to describe anything, the variant unfortunately matters