X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftv%2Ffltcalc.h;h=8bee8a41649e62146c2af7b22300b9d2c7abc74d;hb=f274dcf35aa0d3f4748387dbddfe50e8d7d44951;hp=13f7a0d85809a558bddd185b606e03a97f44b3bd;hpb=b79f4f37c72bc1ba947814a068bf696b4dffb369;p=libfirm diff --git a/ir/tv/fltcalc.h b/ir/tv/fltcalc.h index 13f7a0d85..8bee8a416 100644 --- a/ir/tv/fltcalc.h +++ b/ir/tv/fltcalc.h @@ -40,12 +40,12 @@ enum { FC_PACKED }; -/* rounding modes */ +/** IEEE-754 Rounding modes. */ typedef enum { - FC_TONEAREST, - FC_TOPOSITIVE, - FC_TONEGATIVE, - FC_TOZERO + FC_TONEAREST, /**< if unsure, to the nearest even */ + FC_TOPOSITIVE, /**< to +oo */ + FC_TONEGATIVE, /**< to -oo */ + FC_TOZERO /**< to 0 */ } fc_rounding_mode_t; #define FC_DEFAULT_PRECISION 64 @@ -61,7 +61,7 @@ typedef enum { * returns the size of this buffer */ const void *fc_get_buffer(void); -const int fc_get_buffer_length(void); +int fc_get_buffer_length(void); /*}@*/ char* fc_val_from_str(const char *str, unsigned int len, char exp_size, char mant_size, char *result); @@ -136,7 +136,7 @@ char* fc_get_snan(unsigned int exponent_size, unsigned int mantissa_size, char* char* fc_get_qnan(unsigned int exponent_size, unsigned int mantissa_size, char* result); char* fc_get_plusinf(unsigned int exponent_size, unsigned int mantissa_size, char* result); char* fc_get_minusinf(unsigned int exponent_size, unsigned int mantissa_size, char* result); -/*}@*/ +/*@}*/ int fc_is_zero(const void *a); int fc_is_negative(const void *a); @@ -173,8 +173,8 @@ int fc_comp(const void *a, const void *b); * FC_TONEAREST (default): * Any unrepresentable value is rounded to the nearest representable * value. If it lies in the middle the value with the least significant - * bit of zero is chosen. - * Values too big to represent will round to +-infinity. + * bit of zero is chosen (the even one). + * Values too big to represent will round to +/-infinity. * FC_TONEGATIVE * Any unrepresentable value is rounded towards negative infinity. * Positive values too big to represent will round to the biggest @@ -191,7 +191,7 @@ int fc_comp(const void *a, const void *b); * Values too big to represent will round to the biggest/smallest * representable value. * - * These modes correspond to the modes required by the IEEE standard. + * These modes correspond to the modes required by the IEEE-754 standard. * * @param mode The new rounding mode. Any value other than the four * defined values will have no effect.