14:48 haasn: I'm surprised x = x * x; /* 5 times*/ is measurably faster than x = pow(x, 32.0)
14:48 haasn: you would assume compilers could optimize such low hanging fruit
14:55 arsenm: I bet it's wrong if you look close enough
14:59 arsenm: seems to not underflow correctly
15:08 haasn: ah, fair enough
15:08 haasn: 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:25 arsenm: 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:30 haasn: on a side note, I thought GPUs ran with the equivalent of -ffast-math by default
15:30 arsenm: that's a language choice
15:31 arsenm: -ffast-math is too poorly defined
15:38 arsenm: oh, it's just 5 * n > max_exp and 5 * n < min_exp
16:28 haasn: seems like vulkan specifically mandates -ffast-math be on by default
16:29 haasn: or something vaguely analogous to it, at any rate
16:31 arsenm: i think spirv has fast math by default which is broken as hell
18:30 airlied: spirv vulkan is glsl equiv spirv cl should have cl rules, not sure which is fast math
18:41 arsenm: making it modal and part of the base properties of the representation isn't really better
18:53 airlied: agree, just pointing our saying spirv isnt sufficient to describe anything, the variant unfortunately matters