C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
lx_real.hpp
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: lx_real.hpp,v 1.10 2014/01/30 17:23:47 cxsc Exp $ */
25 
26 
27 /*
28 ** F. Blomquist, University of Wuppertal, 19.09.2007;
29 */
30 
31 /*
32 ** Implementation of the classes
33 **
34 ** lx_real with all tools and elementary functions for real
35 ** point and interval aruments
36 **
37 */
38 
39 #ifndef _CXSC_LX_REAL_HPP_INCLUDED
40 #define _CXSC_LX_REAL_HPP_INCLUDED
41 
42 #include <l_imath.hpp>
43 #include <sstream>
44 #include <cmath>
45 #include <iostream>
46 
47 namespace cxsc {
48 
49  const real Max_Int_R = 9007199254740991.0; // = 2^(53) - 1
50  const real Max_Int_N = -9007199254738891.0; // = -Max_Int_R+2100
51 
53  inline bool Is_Integer(const real& x);
54  // returns 1 if x is an integer value and
55  // if |x| <= 2^53 - 1 = 9007199254740991.0;
56  // otherwise 0 is returnd
57 
58  class lx_real
59  {
60 
61  private:
62  // ------------- Datenelemente -------------------------------------------
63  real ex;
64  l_real lr;
65 
66  public:
67  // ------------- Constructors --------------------------------------------
68 
70  lx_real(void) throw() {}
72  lx_real(const real& n, const l_real &a) throw()
73  {
74  if ( !(Is_Integer(n)) )
75  cxscthrow(REAL_NOT_ALLOWED("lx_real(const real&, const l_real&)"));
76  else
77  {
78  ex = n; lr = a;
79  }
80  }
81 
83  lx_real(const real& n, const real &a) throw()
84  {
85  if ( !(Is_Integer(n)) )
86  cxscthrow(REAL_NOT_ALLOWED("lx_real(const real&, const real&)"));
87  else
88  {
89  ex = n; lr = a;
90  }
91  }
92 
94  explicit lx_real(const l_real &a) throw() : ex(0), lr(a) { }
96  explicit lx_real(const real &a) throw() : ex(0), lr(a) { }
98  lx_real(const real&, const string&) throw();
99 
100 
101  // ------------- Assignments ---------------------------------------------
102 
104  inline lx_real & operator = (const lx_real &) throw();
106  inline lx_real & operator = (const l_real &) throw();
108  inline lx_real & operator = (const real &) throw();
109 
110  // ------------- Functions -----------------------------------------------
111 
113  friend inline int StagPrec(const lx_real&) throw();
115  friend inline real expo(const lx_real&) throw();
117  friend inline int sign(const lx_real&) throw();
119  friend inline l_real lr_part(const lx_real&) throw();
121  friend inline lx_real abs(const lx_real&) throw();
123  friend void scale_up (lx_real &) throw();
125  friend void scale_down(lx_real &) throw();
127  friend inline lx_real adjust(const lx_real &) throw();
128 
130  friend inline bool eq_zero (const lx_real &a) throw(); // a = 0;
132  friend inline bool gr_zero (const lx_real &a) throw(); // a > 0;
134  friend inline bool ge_zero (const lx_real &a) throw(); // a >=0;
136  friend inline bool sm_zero (const lx_real &a) throw(); // a < 0;
138  friend inline bool se_zero (const lx_real &a) throw(); // a <=0;
139 
141  friend inline void times2pown(lx_real &, const real &) throw();
143  friend inline void times2pown_neg(lx_real& a, const real& n) throw();
145  friend inline bool operator ! (const lx_real &) throw();
147  friend inline lx_real operator -(const lx_real &) throw();
148 
149 
150 // ----------------------- Output --------------------------------------------
151 
152 //friend inline std::ostream& operator << (std::ostream& s, const lx_real& a)
153 // throw(); // A value a of type lx_real is written to the output channel.
154 // The above operator is declared and defined in
155 // lx_interval.hpp (outside the class lx_interval) , lx_interval.inl;
157 friend std::string & operator << (std::string &s, const lx_real& a)
158  throw();
159 // The value of a variable a of type lx_real is copied to a string s.
160 // s has the form: {2**(ex)*li}; ex is the exponent to base 2.
161 
162 }; // end of class lx_real
163 
164 // -------------------------------------------------------------
165 // ------- friend functions declared in class lx_real: ---------
166 // -------------------------------------------------------------
167 
168 inline int StagPrec(const lx_real&) throw();
169 inline real expo(const lx_real&) throw();
170 inline int sign(const lx_real&) throw();
171 inline l_real lr_part(const lx_real&) throw();
172 inline lx_real abs(const lx_real&) throw();
173 inline lx_real adjust(const lx_real &) throw();
174 inline void times2pown_neg(lx_real&, const real&) throw();
175 
176  void scale_up (lx_real&) throw();
177  void scale_down(lx_real &a) throw();
178 
179  inline bool eq_zero (const lx_real &a) throw(); // a = 0;
180  inline bool gr_zero (const lx_real &a) throw(); // a > 0;
181  inline bool ge_zero (const lx_real &a) throw(); // a >=0;
182  inline bool sm_zero (const lx_real &a) throw(); // a < 0;
183  inline bool se_zero (const lx_real &a) throw(); // a <=0;
184 
185  inline void times2pown(lx_real &, const real &) throw();
186  inline bool operator ! (const lx_real &) throw();
187 
188  inline lx_real operator -(const lx_real &) throw();
189 
190 // -------------------------- Input ------------------------------------
191 
193  string & operator >> (string &s, lx_real &a) throw();
195  void operator >> (const string &s, lx_real &a) throw();
197  void operator >> (const char *s, lx_real&) throw();
199  std::istream & operator >> (std::istream &s, lx_real &a) throw();
200 
201 // -------------------------- Output ------------------------------------
202 
203  std::string & operator << (std::string &s, const lx_real& a)
204  throw();
205 //inline std::ostream& operator << (std::ostream& s, const lx_real& a)
206 // throw(); // A value a of type lx_real is written to the output channel.
208  inline std::string & operator << (std::string &s, const lx_real& a)
209  throw();
210 // The value of a variable a of type lx_real is copied to a string s.
211 // s has the form: {2**(ex),lr}
212 
213 // ---- function declarations outside the class lx_real ----
214 
216  inline real add_real(const real &a, const real &b) throw();
217 
219  inline real sub_real(const real &a, const real &b) throw();
220 
222  lx_real upper_bnd(const lx_real& x) throw();
223 
225  lx_real lower_bnd(const lx_real& x) throw();
227  inline lx_real operator +(const lx_real &) throw();
228 
230  lx_real operator + (const lx_real &, const lx_real &) throw();
232  inline lx_real operator + (const lx_real&, const l_real &) throw();
234  inline lx_real operator + (const l_real&, const lx_real &) throw();
236  inline lx_real operator + (const lx_real&, const real &) throw();
238  inline lx_real operator + (const real&, const lx_real &) throw();
239 
241  inline lx_real & operator +=(lx_real &, const lx_real &) throw();
243  inline lx_real & operator +=(lx_real &, const l_real &) throw();
245  inline lx_real & operator +=(lx_real &, const real &) throw();
246 
248  inline lx_real operator - (const lx_real &, const lx_real &) throw();
250  inline lx_real operator - (const lx_real &, const l_real &) throw();
252  inline lx_real operator - (const l_real &, const lx_real &) throw();
254  inline lx_real operator - (const lx_real &, const real &) throw();
256  inline lx_real operator - (const real &, const lx_real &) throw();
257 
259  inline lx_real & operator -=(lx_real &, const lx_real &) throw();
261  inline lx_real & operator -=(lx_real &, const l_real &) throw();
263  inline lx_real & operator -=(lx_real &, const real &) throw();
264 
266  lx_real operator * (const lx_real &, const lx_real &) throw();
268  inline lx_real operator * (const lx_real&, const l_real &) throw();
270  inline lx_real operator * (const l_real&, const lx_real &) throw();
272  inline lx_real operator * (const lx_real&, const real &) throw();
274  inline lx_real operator * (const real&, const lx_real &) throw();
275 
277  inline lx_real & operator *=(lx_real &, const lx_real &) throw();
279  inline lx_real & operator *=(lx_real &, const l_real &) throw();
281  inline lx_real & operator *=(lx_real &, const real &) throw();
282 
284  lx_real operator / (const lx_real &, const lx_real &) throw(DIV_BY_ZERO);
286  inline lx_real operator / (const lx_real&, const l_real &) throw();
288  inline lx_real operator / (const l_real&, const lx_real &) throw();
290  inline lx_real operator / (const lx_real&, const real &) throw();
292  inline lx_real operator / (const real&, const lx_real &) throw();
293 
295  inline lx_real & operator /=(lx_real &, const lx_real &) throw();
297  inline lx_real & operator /=(lx_real &, const l_real &) throw();
299  inline lx_real & operator /=(lx_real &, const real &) throw();
300 
302  bool operator == (const lx_real &, const lx_real &) throw();
304  inline bool operator == (const lx_real &, const l_real &) throw();
306  inline bool operator == (const l_real &, const lx_real &) throw();
308  inline bool operator == (const lx_real &, const real &) throw();
310  inline bool operator == (const real &, const lx_real &) throw();
311 
313  inline bool operator != (const lx_real &, const lx_real &) throw();
315  inline bool operator != (const lx_real &, const l_real &) throw();
317  inline bool operator != (const l_real &, const lx_real &) throw();
319  inline bool operator != (const lx_real &, const real &) throw();
321  inline bool operator != (const real &, const lx_real &) throw();
322 
324  bool operator > (const lx_real &, const lx_real &) throw();
325 
327  inline bool operator <= (const lx_real &, const lx_real &) throw();
329  inline bool operator < (const lx_real &, const lx_real &) throw();
331  inline bool operator >= (const lx_real &, const lx_real &) throw();
332 
334  inline bool operator > (const real &, const lx_real &) throw();
336  inline bool operator <= (const real &, const lx_real &) throw();
338  inline bool operator < (const real &, const lx_real &) throw();
340  inline bool operator >= (const real &, const lx_real &) throw();
341 
343  inline bool operator > (const lx_real &, const real &) throw();
345  inline bool operator <= (const lx_real &, const real &) throw();
347  inline bool operator < (const lx_real &, const real &) throw();
349  inline bool operator >= (const lx_real &, const real &) throw();
350 
352  inline bool operator > (const l_real &, const lx_real &) throw();
354  inline bool operator <= (const l_real &, const lx_real &) throw();
356  inline bool operator < (const l_real &, const lx_real &) throw();
358  inline bool operator >= (const l_real &, const lx_real &) throw();
359 
361  inline bool operator > (const lx_real &, const l_real &) throw();
363  inline bool operator <= (const lx_real &, const l_real &) throw();
365  inline bool operator < (const lx_real &, const l_real &) throw();
367  inline bool operator >= (const lx_real &, const l_real &) throw();
368 
370  inline lx_real max(const lx_real&, const lx_real&);
372  inline lx_real min(const lx_real&, const lx_real&);
373 
375  inline real cutint(const real& x) throw();
376 
377 // ------------------- lx_real Constants ------------------------------------
378 
380  lx_real Pi_lx_real() throw(); // pi
382  lx_real Pip2_lx_real() throw(); // pi^2
384  lx_real Pi2_lx_real() throw(); // 2*pi
386  lx_real Pid4_lx_real() throw(); // Pi/4
388  lx_real Pid2_lx_real() throw(); // Pi/2
390  lx_real Ln2_lx_real() throw();
392  lx_real Ln10_lx_real() throw();
394  lx_real Ln10r_lx_real() throw();
396  lx_real Pir_lx_real() throw();
398  lx_real Pi2r_lx_real() throw(); // 1/(2*pi)
400  lx_real SqrtPi_lx_real() throw();
402  lx_real Sqrt2Pi_lx_real() throw();
404  lx_real Sqrt2_lx_real() throw();
406  lx_real Sqrt2r_lx_real() throw();
408  lx_real Sqrt3_lx_real() throw();
410  lx_real Sqrt3r_lx_real() throw();
412  lx_real Sqrt3d2_lx_real() throw();
414  lx_real Ln2r_lx_real() throw();
416  lx_real Pid3_lx_real() throw();
418  lx_real SqrtPir_lx_real() throw();
420  lx_real Sqrt2Pir_lx_real() throw();
422  lx_real LnPi_lx_real() throw();
424  lx_real Ln2Pi_lx_real() throw();
426  lx_real E_lx_real() throw();
428  lx_real Ep2_lx_real() throw();
430  lx_real Ep2r_lx_real() throw();
432  lx_real Er_lx_real() throw();
434  lx_real EpPi_lx_real() throw();
436  lx_real EpPid2_lx_real() throw();
438  lx_real EpPid4_lx_real() throw();
440  lx_real Ep2Pi_lx_real() throw();
442  lx_real EulerGamma_lx_real() throw();
444  lx_real Catalan_lx_real() throw();
446  lx_real sqrt5_lx_real() throw();
448  lx_real sqrt7_lx_real() throw();
450  lx_real One_m_lx_real() throw();
452  lx_real One_p_lx_real() throw();
453 
454 // **********************************************************************
455 // **********************************************************************
456 
457 
458 
459 // ------------------- Array of constants ----------------------
460 
461 // const real ln_N[180];
462 // ln_N[0] = ln(2); ln_N[1] = ln(3); ... ln_N[179] = ln(181);
463 
464 const real ln_N[180] =
465 {6243314768165359.0 / 9007199254740992.0,
466  4947709893870347.0 / 4503599627370496.0,
467  6243314768165359.0 / 4503599627370496.0,
468  7248263982714163.0 / 4503599627370496.0,
469  8069367277953026.0 / 4503599627370496.0,
470  8763600222181975.0 / 4503599627370496.0,
471  4682486076124019.0 / 2251799813685248.0,
472  4947709893870347.0 / 2251799813685248.0,
473  5184960683398422.0 / 2251799813685248.0,
474  5399580128524108.0 / 2251799813685248.0,
475  5595512331017853.0 / 2251799813685248.0,
476  5775752485243985.0 / 2251799813685248.0,
477  5942628803132327.0 / 2251799813685248.0,
478  6097986938292255.0 / 2251799813685248.0,
479  6243314768165359.0 / 2251799813685248.0,
480  6379829280276346.0 / 2251799813685248.0,
481  6508538585911686.0 / 2251799813685248.0,
482  6630287144694572.0 / 2251799813685248.0,
483  6745789375439761.0 / 2251799813685248.0,
484  6855655058026161.0 / 2251799813685248.0,
485  6960408820565448.0 / 2251799813685248.0,
486  7060505291240432.0 / 2251799813685248.0,
487  7156341023059193.0 / 2251799813685248.0,
488  7248263982714163.0 / 2251799813685248.0,
489  7336581177285325.0 / 2251799813685248.0,
490  7421564840805520.0 / 2251799813685248.0,
491  7503457495173667.0 / 2251799813685248.0,
492  7582476122586655.0 / 2251799813685248.0,
493  7658815630333595.0 / 2251799813685248.0,
494  7732651747257178.0 / 2251799813685248.0,
495  7804143460206699.0 / 2251799813685248.0,
496  7873435075459281.0 / 2251799813685248.0,
497  7940657972317686.0 / 2251799813685248.0,
498  8005932102448069.0 / 2251799813685248.0,
499  8069367277953026.0 / 2251799813685248.0,
500  8131064282924989.0 / 2251799813685248.0,
501  8191115836735912.0 / 2251799813685248.0,
502  8249607432179158.0 / 2251799813685248.0,
503  8306618067481101.0 / 2251799813685248.0,
504  8362220887911502.0 / 2251799813685248.0,
505  8416483750067501.0 / 2251799813685248.0,
506  8469469719751697.0 / 2251799813685248.0,
507  8521237512606787.0 / 2251799813685248.0,
508  8571841885227428.0 / 2251799813685248.0,
509  8621333983281772.0 / 2251799813685248.0,
510  8669761652191414.0 / 2251799813685248.0,
511  8717169715100533.0 / 2251799813685248.0,
512  8763600222181975.0 / 2251799813685248.0,
513  8809092674755503.0 / 2251799813685248.0,
514  8853684227211519.0 / 2251799813685248.0,
515  8897409869326665.0 / 2251799813685248.0,
516  8940302591212715.0 / 2251799813685248.0,
517  8982393532846860.0 / 2251799813685248.0,
518  4511856059940595.0 / 1125899906842624.0,
519  4532143093607504.0 / 1125899906842624.0,
520  4552071045814873.0 / 1125899906842624.0,
521  4571652407313997.0 / 1125899906842624.0,
522  4590899028240761.0 / 1125899906842624.0,
523  4609822161187467.0 / 1125899906842624.0,
524  4628432500714509.0 / 1125899906842624.0,
525  4646740219649259.0 / 1125899906842624.0,
526  4664755002480667.0 / 1125899906842624.0,
527  4682486076124019.0 / 1125899906842624.0,
528  4699942238300533.0 / 1125899906842624.0,
529  4717131883750310.0 / 1125899906842624.0,
530  4734063028474157.0 / 1125899906842624.0,
531  4750743332179513.0 / 1125899906842624.0,
532  4767180119087803.0 / 1125899906842624.0,
533  4783380397244705.0 / 1125899906842624.0,
534  4799350876460745.0 / 1125899906842624.0,
535  4815097984997183.0 / 1125899906842624.0,
536  4830627885101030.0 / 1125899906842624.0,
537  4845946487483165.0 / 1125899906842624.0,
538  4861059464824668.0 / 1125899906842624.0,
539  4875972264388626.0 / 1125899906842624.0,
540  4890690119807548.0 / 1125899906842624.0,
541  4905218062110249.0 / 1125899906842624.0,
542  4919560930046323.0 / 1125899906842624.0,
543  4933723379761220.0 / 1125899906842624.0,
544  4947709893870347.0 / 1125899906842624.0,
545  4961524789976421.0 / 1125899906842624.0,
546  4975172228670594.0 / 1125899906842624.0,
547  4988656221054420.0 / 1125899906842624.0,
548  5001980635816714.0 / 1125899906842624.0,
549  5015149205896518.0 / 1125899906842624.0,
550  5028165534760914.0 / 1125899906842624.0,
551  5041033102324064.0 / 1125899906842624.0,
552  5053755270531830.0 / 1125899906842624.0,
553  5066335288634384.0 / 1125899906842624.0,
554  5078776298167486.0 / 1125899906842624.0,
555  5091081337661556.0 / 1125899906842624.0,
556  5103253347096176.0 / 1125899906842624.0,
557  5115295172116377.0 / 1125899906842624.0,
558  5127209568025827.0 / 1125899906842624.0,
559  5138999203570936.0 / 1125899906842624.0,
560  5150666664528888.0 / 1125899906842624.0,
561  5162214457111658.0 / 1125899906842624.0,
562  5173645011197227.0 / 1125899906842624.0,
563  5184960683398422.0 / 1125899906842624.0,
564  5196163759979057.0 / 1125899906842624.0,
565  5207256459626429.0 / 1125899906842624.0,
566  5218240936088556.0 / 1125899906842624.0,
567  5229119280684002.0 / 1125899906842624.0,
568  5239893524691621.0 / 1125899906842624.0,
569  5250565641627027.0 / 1125899906842624.0,
570  5261137549412187.0 / 1125899906842624.0,
571  5271611112444100.0 / 1125899906842624.0,
572  5281988143568134.0 / 1125899906842624.0,
573  5292270405961265.0 / 1125899906842624.0,
574  5302459614930081.0 / 1125899906842624.0,
575  5312557439628173.0 / 1125899906842624.0,
576  5322565504697180.0 / 1125899906842624.0,
577  5332485391835543.0 / 1125899906842624.0,
578  5342318641298757.0 / 1125899906842624.0,
579  5352066753334667.0 / 1125899906842624.0,
580  5361731189557166.0 / 1125899906842624.0,
581  5371313374261431.0 / 1125899906842624.0,
582  5380814695683667.0 / 1125899906842624.0,
583  5390236507208137.0 / 1125899906842624.0,
584  5399580128524108.0 / 1125899906842624.0,
585  5408846846735179.0 / 1125899906842624.0,
586  5418037917423337.0 / 1125899906842624.0,
587  5427154565669929.0 / 1125899906842624.0,
588  5436197987035623.0 / 1125899906842624.0,
589  5445169348501337.0 / 1125899906842624.0,
590  5454069789371970.0 / 1125899906842624.0,
591  5462900422144689.0 / 1125899906842624.0,
592  5471662333343435.0 / 1125899906842624.0,
593  5480356584321203.0 / 1125899906842624.0,
594  5488984212031586.0 / 1125899906842624.0,
595  5497546229770980.0 / 1125899906842624.0,
596  5506043627892780.0 / 1125899906842624.0,
597  5514477374494827.0 / 1125899906842624.0,
598  5522848416081301.0 / 1125899906842624.0,
599  5531157678200183.0 / 1125899906842624.0,
600  5539406066057373.0 / 1125899906842624.0,
601  5547594465108473.0 / 1125899906842624.0,
602  5555723741629202.0 / 1125899906842624.0,
603  5563794743265374.0 / 1125899906842624.0,
604  5571808299563294.0 / 1125899906842624.0,
605  5579765222481415.0 / 1125899906842624.0,
606  5587666306884046.0 / 1125899906842624.0,
607  5595512331017853.0 / 1125899906842624.0,
608  5603304056971868.0 / 1125899906842624.0,
609  5611042231121700.0 / 1125899906842624.0,
610  5618727584558574.0 / 1125899906842624.0,
611  5626360833503834.0 / 1125899906842624.0,
612  5633942679709485.0 / 1125899906842624.0,
613  5641473810845338.0 / 1125899906842624.0,
614  5648954900873299.0 / 1125899906842624.0,
615  5656386610409296.0 / 1125899906842624.0,
616  5663769587073346.0 / 1125899906842624.0,
617  5671104465828218.0 / 1125899906842624.0,
618  5678391869307130.0 / 1125899906842624.0,
619  5685632408130919.0 / 1125899906842624.0,
620  5692826681215068.0 / 1125899906842624.0,
621  5699975276066993.0 / 1125899906842624.0,
622  5707078769073944.0 / 1125899906842624.0,
623  5714137725781890.0 / 1125899906842624.0,
624  5721152701165710.0 / 1125899906842624.0,
625  5728124239891016.0 / 1125899906842624.0,
626  5735052876567931.0 / 1125899906842624.0,
627  5741939135997091.0 / 1125899906842624.0,
628  5748783533408181.0 / 1125899906842624.0,
629  5755586574691264.0 / 1125899906842624.0,
630  5762348756621151.0 / 1125899906842624.0,
631  5769070567075090.0 / 1125899906842624.0,
632  5775752485243985.0 / 1125899906842624.0,
633  5782394981837384.0 / 1125899906842624.0,
634  5788998519282460.0 / 1125899906842624.0,
635  5795563551917188.0 / 1125899906842624.0,
636  5802090526177927.0 / 1125899906842624.0,
637  5808579880781584.0 / 1125899906842624.0,
638  5815032046902576.0 / 1125899906842624.0,
639  5821447448344733.0 / 1125899906842624.0,
640  5827826501708347.0 / 1125899906842624.0,
641  5834169616552500.0 / 1125899906842624.0,
642  5840477195552856.0 / 1125899906842624.0,
643  5846749634655054.0 / 1125899906842624.0,
644  5852987323223851.0 / 1125899906842624.0};
645 
646 // ------------------------------------------------------------------------
647 // --------------- lx_real elementary functions ---------------------------
648 // ------------------------------------------------------------------------
649 
651  lx_real sqrt(const lx_real&) throw();
653  lx_real sqr(const lx_real&) throw();
655  lx_real ln(const lx_real &) throw();
657  lx_real log2(const lx_real &) throw();
659  lx_real log10(const lx_real &) throw();
661  lx_real lnp1(const lx_real &) throw();
663  lx_real exp(const lx_real &) throw();
665  lx_real exp2(const lx_real &) throw(); // 2^x
667  lx_real exp10(const lx_real &) throw(); // 10^x
669  lx_real expm1(const lx_real &x) throw();
671  lx_real power(const lx_real &, const real &) throw();
673  lx_real pow(const lx_real &, const lx_real &) throw();
675  lx_real xp1_pow_y(const lx_real &, const lx_real &) throw();
677  lx_real sin(const lx_real &)throw();
679  lx_real sin_n(const lx_real &x, const real& n) throw();
681  lx_real cos(const lx_real &) throw();
683  lx_real cos_n(const lx_real &x, const real& n) throw();
685  lx_real tan(const lx_real &) throw();
687  lx_real cot(const lx_real &) throw();
689  lx_real sqrt1px2(const lx_real &) throw();
691  lx_real atan(const lx_real &) throw();
693  lx_real sqrt1mx2(const lx_real &) throw();
695  lx_real sqrtx2m1(const lx_real &) throw();
697  lx_real asin(const lx_real & ) throw();
699  lx_real acos(const lx_real &) throw();
701  lx_real acot(const lx_real &) throw();
703  lx_real sinh(const lx_real &) throw();
705  lx_real cosh(const lx_real &) throw();
707  lx_real tanh(const lx_real &) throw();
709  lx_real coth(const lx_real &) throw();
711  lx_real sqrtp1m1(const lx_real &) throw();
713  lx_real asinh(const lx_real &) throw();
715  lx_real acosh(const lx_real &) throw();
717  lx_real acoshp1(const lx_real &) throw();
719  lx_real atanh(const lx_real &) throw();
721  lx_real atanh1m(const lx_real &) throw();
723  lx_real atanhm1p(const lx_real &) throw();
725  lx_real acoth(const lx_real &) throw();
727  lx_real acothp1(const lx_real &) throw();
729  lx_real acothm1m(const lx_real &) throw();
731  lx_real sqrtx2y2(const lx_real &, const lx_real &) throw();
733  lx_real ln_sqrtx2y2(const lx_real &, const lx_real &) throw();
735  lx_real sqrt(const lx_real &, int) throw();
736 
737 } // end namespace cxsc
738 
739 #include "lx_real.inl"
740 
741 #endif // _CXSC_LX_REAL_HPP_INCLUDED
cinterval sqrtx2m1(const cinterval &z)
Calculates .
Definition: cimath.cpp:1109
cimatrix & operator/=(cimatrix &m, const cinterval &c)
Implementation of division and allocation operation.
Definition: cimatrix.inl:1623
cinterval sqrt1px2(const cinterval &z)
Calculates .
Definition: cimath.cpp:1071
lx_real lower_bnd(const lx_real &x)
Returns a rather great lower bound of x.
cinterval log2(const cinterval &z)
Calculates .
Definition: cimath.cpp:898
lx_real EpPid4_lx_real()
lx_real approximation for
interval sqrtx2y2(const interval &x, const interval &y)
Calculates .
Definition: imath.cpp:80
real cutint(const real &x)
Returns the truncated integer part of x.
Definition: lx_real.inl:364
cinterval ln(const cinterval &z)
Calculates .
Definition: cimath.cpp:851
cinterval sin(const cinterval &z)
Calculates .
Definition: cimath.cpp:215
lx_real EpPid2_lx_real()
lx_real approximation for
lx_real EpPi_lx_real()
lx_real approximation for
cinterval cot(const cinterval &z)
Calculates .
Definition: cimath.cpp:538
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
interval ln_sqrtx2y2(const interval &x, const interval &y)
Calculates .
Definition: imath.cpp:581
cinterval acot(const cinterval &z)
Calculates .
Definition: cimath.cpp:3130
lx_real E_lx_real()
lx_real approximation for
cinterval atan(const cinterval &z)
Calculates .
Definition: cimath.cpp:2938
cinterval acos(const cinterval &z)
Calculates .
Definition: cimath.cpp:2553
cinterval sqr(const cinterval &z)
Calculates .
Definition: cimath.cpp:3342
lx_real Pid2_lx_real()
lx_real approximation for
lx_real One_p_lx_real()
lx_real approximation for
lx_real sqrt5_lx_real()
lx_real approximation for
cinterval expm1(const cinterval &z)
Calculates .
Definition: cimath.cpp:177
lx_interval cos_n(const lx_interval &x, const real &n)
Calculates .
lx_real Sqrt2_lx_real()
lx_real approximation for
lx_real Sqrt3d2_lx_real()
lx_real approximation for
real add_real(const real &a, const real &b)
Returns a,b must be integers with .
Definition: lx_real.inl:75
cimatrix & operator *=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
cinterval tanh(const cinterval &z)
Calculates .
Definition: cimath.cpp:565
cinterval asinh(const cinterval &z)
Calculates .
Definition: cimath.cpp:2718
cinterval log10(const cinterval &z)
Calculates .
Definition: cimath.cpp:903
lx_real EulerGamma_lx_real()
lx_real approximation for
cinterval sqrt1mx2(const cinterval &z)
Calculates .
Definition: cimath.cpp:1140
interval acoshp1(const interval &x)
Calculates .
Definition: imath.cpp:617
civector operator *(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
lx_real SqrtPi_lx_real()
lx_real approximation for
cinterval lnp1(const cinterval &z)
Calculates .
Definition: cimath.cpp:867
lx_real Er_lx_real()
lx_real approximation for
lx_real Catalan_lx_real()
lx_real approximation for
lx_real Ln2Pi_lx_real()
lx_real approximation for
lx_real Pid3_lx_real()
lx_real approximation for
real sub_real(const real &a, const real &b)
Returns a,b must be integers with .
Definition: lx_real.inl:84
lx_real upper_bnd(const lx_real &x)
Returns a rather small upper bound of x.
lx_real Pip2_lx_real()
lx_real approximation for
cinterval sqrt(const cinterval &z)
Calculates .
Definition: cimath.cpp:1007
lx_real Sqrt2Pi_lx_real()
lx_real approximation for
lx_interval atanh1m(const lx_interval &x)
Calculates .
lx_real sqrt7_lx_real()
lx_real approximation for
lx_interval sin_n(const lx_interval &x, const real &n)
Calculates .
cinterval cos(const cinterval &z)
Calculates .
Definition: cimath.cpp:207
lx_real LnPi_lx_real()
lx_real approximation for
cinterval atanh(const cinterval &z)
Calculates .
Definition: cimath.cpp:3317
lx_interval atanhm1p(const lx_interval &x)
Calculates .
lx_real Sqrt3_lx_real()
lx_real approximation for
cinterval exp10(const cinterval &z)
Calculates .
Definition: cimath.cpp:172
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc)
Implementation of standard algebraic addition and allocation operation.
Definition: cdot.inl:251
void times2pown(cinterval &x, int n)
Fast multiplication of reference parameter [z] with .
Definition: cimath.cpp:2059
cinterval sqrtp1m1(const cinterval &z)
Calculates .
Definition: cimath.cpp:1054
lx_real Pi2_lx_real()
lx_real approximation for
cinterval exp(const cinterval &z)
Calculates .
Definition: cimath.cpp:159
lx_interval acothp1(const lx_interval &x)
Calculates .
lx_interval xp1_pow_y(const lx_interval &x, const lx_interval &y)
Calculates .
lx_real Ln2_lx_real()
lx_real approximation for
cinterval cosh(const cinterval &z)
Calculates .
Definition: cimath.cpp:223
lx_real Pir_lx_real()
lx_real approximation for
lx_real Ln2r_lx_real()
lx_real approximation for
cinterval tan(const cinterval &z)
Calculates .
Definition: cimath.cpp:393
cinterval sinh(const cinterval &z)
Calculates .
Definition: cimath.cpp:231
lx_real Sqrt2Pir_lx_real()
lx_real approximation for
lx_interval acothm1m(const lx_interval &x)
Calculates .
cinterval exp2(const cinterval &z)
Calculates .
Definition: cimath.cpp:167
lx_real Ep2_lx_real()
lx_real approximation for
lx_real Ep2r_lx_real()
lx_real approximation for
lx_real Ep2Pi_lx_real()
lx_real approximation for
cinterval asin(const cinterval &z)
Calculates .
Definition: cimath.cpp:2311
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
Definition: cimatrix.inl:730
cinterval acoth(const cinterval &z)
Calculates .
Definition: cimath.cpp:3330
lx_real Ln10r_lx_real()
lx_real approximation for
lx_real Sqrt2r_lx_real()
lx_real approximation for
lx_real SqrtPir_lx_real()
lx_real approximation for
cinterval coth(const cinterval &z)
Calculates .
Definition: cimath.cpp:578
lx_real Sqrt3r_lx_real()
lx_real approximation for
cinterval pow(const cinterval &z, const interval &p)
Calculates .
Definition: cimath.cpp:2074
lx_real One_m_lx_real()
lx_real approximation for
cinterval power(const cinterval &z, int n)
Calculates .
Definition: cimath.cpp:1941
lx_real Pid4_lx_real()
lx_real approximation for
bool Is_Integer(const real &x)
Returns 1 if x is an integer value and if .
Definition: lx_real.inl:63
lx_real Ln10_lx_real()
lx_real approximation for
lx_real Pi_lx_real()
lx_real approximation for
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.
Definition: cimatrix.inl:737
cinterval acosh(const cinterval &z)
Calculates .
Definition: cimath.cpp:2732
lx_real Pi2r_lx_real()
lx_real approximation for