[CLN-list] confusion with cln::cl_F and cln::cl_R

Joshua Friedman crowneagle at gmail.com
Tue May 18 17:22:25 CEST 2010


The program runs when I define "bigF = cln_R", but I get errors when I set
"bigF = cln_F"
I found that the exponential function only gives many digits of precision
when I use cln_F.
I am attaching my program and the out put is below:

fuji:rama joshua$ make
g++ -DHAVE_CONFIG_H -I.  -I../include -I../include   -g -O2 -MT e.o -MD -MP
-MF .deps/e.Tpo -c -o e.o e.cc
In file included from /usr/include/c++/4.0.0/backward/iostream.h:31,
                 from e.cc:1:
/usr/include/c++/4.0.0/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or antiquated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the C++
standard. Examples include substituting the <X> header for the <X.h> header
for C++ includes, or <iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.
e.cc: In function ‘bigF h(bigF, bigF*, int, int, int)’:
e.cc:233: error: conversion from ‘const cln::cl_N’ to non-scalar type ‘bigF’
requested
e.cc: In function ‘bigF ff(bigF, bigF, bigF*, int, int, int)’:
e.cc:251: error: no match for ‘operator=’ in ‘q = cln::operator*(const
cln::cl_R&, const cln::cl_R&)(((const cln::cl_R&)(& cln::exp(const
cln::cl_R&)())))’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:258: error: conversion from ‘const cln::cl_N’ to non-scalar type ‘bigF’
requested
e.cc: In function ‘bigF v(bigF, bigF*, int, int, int)’:
e.cc:275: error: conversion from ‘int’ to ‘cln::cl_F’ is ambiguous
../include/cln/float_class.h:38: note: candidates are:
cln::cl_F::cl_F(cln::cl_anything*)
../include/cln/float_class.h:26: note:                 cln::cl_F::cl_F(const
char*)
../include/cln/float_class.h:48: note:
cln::cl_F::cl_F(double)
../include/cln/float_class.h:47: note:
cln::cl_F::cl_F(float)
e.cc:276: error: conversion from ‘int’ to ‘cln::cl_F’ is ambiguous
../include/cln/float_class.h:38: note: candidates are:
cln::cl_F::cl_F(cln::cl_anything*) <near match>
../include/cln/float_class.h:26: note:                 cln::cl_F::cl_F(const
char*) <near match>
../include/cln/float_class.h:48: note:
cln::cl_F::cl_F(double)
../include/cln/float_class.h:47: note:
cln::cl_F::cl_F(float)
e.cc:281: error: no match for ‘operator=’ in ‘w = cln::operator*(const
cln::cl_R&, const cln::cl_R&)(((const cln::cl_R&)((const cln::cl_R*)(&
w.cln::cl_F::<anonymous>))))’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:283: error: ambiguous overload for ‘operator=’ in ‘q = 0’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:289: error: no match for ‘operator=’ in ‘q = cln::operator*(const
cln::cl_R&, const cln::cl_R&)(((const cln::cl_R&)(& cln::exp(const
cln::cl_R&)())))’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:294: error: conversion from ‘const cln::cl_N’ to non-scalar type ‘bigF’
requested
e.cc: In function ‘bigF integralH(bigF*, int, int, int, int)’:
e.cc:312: error: ambiguous overload for ‘operator=’ in ‘aa = 1’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:313: error: ambiguous overload for ‘operator=’ in ‘b = 20’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:317: error: conversion from ‘int’ to ‘cln::cl_F’ is ambiguous
../include/cln/float_class.h:38: note: candidates are:
cln::cl_F::cl_F(cln::cl_anything*)
../include/cln/float_class.h:26: note:                 cln::cl_F::cl_F(const
char*)
../include/cln/float_class.h:48: note:
cln::cl_F::cl_F(double)
../include/cln/float_class.h:47: note:
cln::cl_F::cl_F(float)
e.cc:320: error: ambiguous overload for ‘operator=’ in ‘w = 0’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:321: error: conversion from ‘int’ to ‘cln::cl_F’ is ambiguous
../include/cln/float_class.h:38: note: candidates are:
cln::cl_F::cl_F(cln::cl_anything*) <near match>
../include/cln/float_class.h:26: note:                 cln::cl_F::cl_F(const
char*) <near match>
../include/cln/float_class.h:48: note:
cln::cl_F::cl_F(double)
../include/cln/float_class.h:47: note:
cln::cl_F::cl_F(float)
e.cc: In function ‘bigF integralL(bigF*, int, int, int, int)’:
e.cc:339: error: ambiguous overload for ‘operator=’ in ‘b = 1’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
e.cc:346: error: ambiguous overload for ‘operator=’ in ‘w = 0’
../include/cln/float_class.h:40: note: candidates are: cln::cl_F&
cln::cl_F::operator=(const cln::cl_F&)
../include/cln/float_class.h:47: note:                 cln::cl_F&
cln::cl_F::operator=(float)
../include/cln/float_class.h:48: note:                 cln::cl_F&
cln::cl_F::operator=(double)
make: *** [e.o] Error 1
fuji:rama joshua$ make





-- 
Joshua Friedman PhD
CrownEagle at gmail.com
http://www.math.sunysb.edu/~joshua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cebix.net/pipermail/cln-list/attachments/20100518/5dda878b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e.cc
Type: application/octet-stream
Size: 8206 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/cln-list/attachments/20100518/5dda878b/attachment.dll>


More information about the CLN-list mailing list