@ -3,8 +3,6 @@
// General includes.
// General includes.
# include "cl_sysdep.h"
# include "cl_sysdep.h"
CL_PROVIDE ( cl_F_leastneg )
// Specification.
// Specification.
# include "cln/float.h"
# include "cln/float.h"
@ -19,22 +17,7 @@ CL_PROVIDE(cl_F_leastneg)
namespace cln {
namespace cln {
// Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen -.
static const cl_SF least_negative_SF =
make_SF ( - 1 , SF_exp_low , bit ( SF_mant_len ) ) ;
static const cl_FF least_negative_FF =
encode_FF ( - 1 , FF_exp_low - FF_exp_mid , bit ( FF_mant_len ) ) ;
static const cl_DF least_negative_DF =
# if (cl_word_size==64)
encode_DF ( - 1 , DF_exp_low - DF_exp_mid , bit ( DF_mant_len ) ) ;
# else
encode_DF ( - 1 , DF_exp_low - DF_exp_mid , bit ( DF_mant_len - 32 ) , 0 ) ;
# endif
inline const cl_LF least_negative_LF ( uintC len )
static inline const cl_LF least_negative_LF ( uintC len )
{
{
var Lfloat erg = allocate_lfloat ( len , LF_exp_low , - 1 ) ;
var Lfloat erg = allocate_lfloat ( len , LF_exp_low , - 1 ) ;
# if CL_DS_BIG_ENDIAN_P
# if CL_DS_BIG_ENDIAN_P
@ -49,6 +32,21 @@ inline const cl_LF least_negative_LF (uintC len)
const cl_F least_negative_float ( float_format_t f )
const cl_F least_negative_float ( float_format_t f )
{
{
// Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen -.
static const cl_SF least_negative_SF =
make_SF ( - 1 , SF_exp_low , bit ( SF_mant_len ) ) ;
static const cl_FF least_negative_FF =
encode_FF ( - 1 , FF_exp_low - FF_exp_mid , bit ( FF_mant_len ) ) ;
static const cl_DF least_negative_DF =
# if (cl_word_size==64)
encode_DF ( - 1 , DF_exp_low - DF_exp_mid , bit ( DF_mant_len ) ) ;
# else
encode_DF ( - 1 , DF_exp_low - DF_exp_mid , bit ( DF_mant_len - 32 ) , 0 ) ;
# endif
floatformatcase ( ( uintC ) f
floatformatcase ( ( uintC ) f
, return least_negative_SF ;
, return least_negative_SF ;
, return least_negative_FF ;
, return least_negative_FF ;
@ -59,4 +57,3 @@ const cl_F least_negative_float (float_format_t f)
} // namespace cln
} // namespace cln
CL_PROVIDE_END ( cl_F_leastneg )