1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
#
# This file is part of Rheolef.
#
# Copyright (C) 2000-2009 Pierre Saramito
#
# Rheolef is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Rheolef is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Rheolef; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# -------------------------------------------------------------------------
reste a faire
- essayer d'integrer dans rheolef avec detection de cln
- e/s : ne tient pas compte du: cout << setprecision(digit10)
- les maths ieee: voir blitz
- question : comment envoyer un bigfloat par mpi ?
suite:
- voir les entiers : pour mailleurs, etc...
FILE: cf_float.h
//=============================================================================
// random_F(randomstate,n) liefert zu einem Float n>0 ein zuflliges
// Float x mit 0 <= x < n.
// > randomstate: ein Random-State, wird verndert
extern const cl_F random_F (cl_random_state& randomstate, const cl_F& n);
inline const cl_F random_F (const cl_F& n)
{ return random_F(cl_default_random_state,n); }
//=============================================================================
// Returns the largest (most positive) floating point number in float format f.
extern const cl_F most_positive_float (cl_float_format_t f);
// Returns the smallest (most negative) floating point number in float format f.
extern const cl_F most_negative_float (cl_float_format_t f);
// Returns the least positive floating point number (i.e. > 0 but closest to 0)
// in float format f.
extern const cl_F least_positive_float (cl_float_format_t f);
// Returns the least negative floating point number (i.e. < 0 but closest to 0)
// in float format f.
extern const cl_F least_negative_float (cl_float_format_t f);
// Returns the smallest floating point number e > 0 such that 1+e != 1.
extern const cl_F float_epsilon (cl_float_format_t f);
// Returns the smallest floating point number e > 0 such that 1-e != 1.
extern const cl_F float_negative_epsilon (cl_float_format_t f);
//=============================================================================
// cl_pi(y) liefert die Zahl pi im selben Float-Format wie y.
// > y: ein Float
extern const cl_F cl_pi (const cl_F& y);
// cl_pi(y) liefert die Zahl pi im Float-Format f.
// > f: eine Float-Format-Spezifikation
extern const cl_F cl_pi (cl_float_format_t f);
// cl_eulerconst(y) liefert die Eulersche Konstante
// im selben Float-Format wie y.
// > y: ein Float
extern const cl_F cl_eulerconst (const cl_F& y);
// cl_eulerconst(y) liefert die Eulersche Konstante im Float-Format f.
// > f: eine Float-Format-Spezifikation
extern const cl_F cl_eulerconst (cl_float_format_t f);
// cl_eulerconst() liefert die Eulersche Konstante im Default-Float-Format.
extern const cl_F cl_eulerconst (void);
//CL_REQUIRE(cl_F_eulerconst_var)
// cl_catalanconst(y) liefert die Catalansche Konstante
// im selben Float-Format wie y.
// > y: ein Float
extern const cl_F cl_catalanconst (const cl_F& y);
// cl_catalanconst(y) liefert die Catalansche Konstante im Float-Format f.
// > f: eine Float-Format-Spezifikation
extern const cl_F cl_catalanconst (cl_float_format_t f);
// cl_catalanconst() liefert die Catalansche Konstante im Default-Float-Format.
extern const cl_F cl_catalanconst (void);
//CL_REQUIRE(cl_F_catalanconst_var)
// zeta(s) returns the Riemann zeta function at s>1.
extern const cl_F cl_zeta (int s, const cl_F& y);
extern const cl_F cl_zeta (int s, cl_float_format_t f);
extern const cl_F cl_zeta (int s);
extern const cl_F square (const cl_F& x);
extern const cl_F ffloor (const cl_F& x);
extern const cl_F fceiling (const cl_F& x);
extern const cl_F ftruncate (const cl_F& x);
extern const cl_F fround (const cl_F& x);
//=============================================================================
|