[Mesa-stable] [Mesa-dev] [PATCH] nir: Use double-precision pow() when bit_size is 64, powf() otherwise
Patrick Baggett
baggett.patrick at gmail.com
Mon Mar 28 18:58:01 UTC 2016
> What are the rules in C when you compare a double
> variable with a single constant?
>
> void foo(double d)
> {
> /* Does d get converted to single, or does 0.0f get converted to
> * double?
> */
> if (d == 0.0f)
> printf("zero\n");
> }
The 0.0f is converted to a double. One site [1] has a likely looking
reference. :) Sadly, I don't know how to check the C spec directly (I
think that it is not free).
[1] https://www.eskimo.com/~scs/cclass/int/sx4cb.html
More information about the mesa-stable
mailing list