Hi all: Are there any way to declare all variables with a number digits for example, something like. funcion_foo (DIGITS); And then you are sure that all floating points variables are of number of decimal digits given by DIGITS. Thanks. -- *************************************************************************** * Dr. Isidro Cachadiña Gutiérrez * * Departamento de Física * * Facultad de Ciencias * * Universidad de Extremadura * * 06071 Badajoz ( SPAIN ) * * email: icacha@unex.es * * Teléfono: +34 924 289 300 Ext. 6826 Fax: +34 924 289 651 * *************************************************************************** * Usuario Linux: 8569 * * Para clave pública GnuPG: http://onsager.unex.es/firma.pub.asc * ***************************************************************************
On Tue, 30 Nov 2004, Isidro [iso-8859-15] Cachadiña Gutiérrez wrote:
Are there any way to declare all variables with a number digits for example, something like.
funcion_foo (DIGITS);
And then you are sure that all floating points variables are of number of decimal digits given by DIGITS.
Sort of, yes. Please search the documentation for default_float_format. Saludos -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
El Martes, 30 de Noviembre de 2004 22:19, Richard B. Kreckel escribió:
On Tue, 30 Nov 2004, Isidro [iso-8859-15] Cachadiña Gutiérrez wrote:
Are there any way to declare all variables with a number digits for example, something like.
funcion_foo (DIGITS);
And then you are sure that all floating points variables are of number of decimal digits given by DIGITS.
Sort of, yes. Please search the documentation for default_float_format.
Yes, I've read the documentation for default_float_format and I want something like default_float_format float_format(50); cause float_format (uintL n) "gives the smalles float format which guarantees at least n decimal digits in the mantisa." Then, if I want that all numbers with 50 decimal digits the global variable default_float_format has to be equalled with this function, or am I wrong? default_float_format and float_format are of the type float_format_t and the compiler doesn't want compile it, perhaps I am doing someting wrong. Saludos. -- *************************************************************************** * Dr. Isidro Cachadiña Gutiérrez * * Departamento de Física * * Facultad de Ciencias * * Universidad de Extremadura * * 06071 Badajoz ( SPAIN ) * * email: icacha@unex.es * * Teléfono: +34 924 289 300 Ext. 6826 Fax: +34 924 289 651 * *************************************************************************** * Usuario Linux: 8569 * * Para clave pública GnuPG: http://onsager.unex.es/firma.pub.asc * ***************************************************************************
Hi! On Wed, 1 Dec 2004, Isidro Cachadiña Gutiérrez wrote:
Yes, I've read the documentation for default_float_format and I want something like
default_float_format float_format(50);
cause float_format (uintL n) "gives the smalles float format which guarantees at least n decimal digits in the mantisa."
Then, if I want that all numbers with 50 decimal digits the global variable default_float_format has to be equalled with this function, or am I wrong?
Sorry, I have no idea what the problem is supposed to be. Maybe you want the helper function cl_float()? From the documentation: `cl_F cl_float (const TYPE&x)' Returns `x' as a float of format `default_float_format' if it is an exact number, or `x' itself if it is already a float.
default_float_format and float_format are of the type float_format_t and the compiler doesn't want compile it, perhaps I am doing someting wrong.
Please explain what the compiler does not want to compile and somebody on this list might be able to help you. The line at the top of your mail cannot be the problem since it compiles just fine over here. Regards -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
El Miércoles, 1 de Diciembre de 2004 23:30, Richard B. Kreckel escribió:
Hi!
On Wed, 1 Dec 2004, Isidro Cachadiña Gutiérrez wrote:
Yes, I've read the documentation for default_float_format and I want something like
default_float_format float_format(50);
Oh. I was wrong, I miss the = sign above... Now its works fine. default_float_format =float_format(50); Gracias. -- *************************************************************************** * Dr. Isidro Cachadiña Gutiérrez * * Departamento de Física * * Facultad de Ciencias * * Universidad de Extremadura * * 06071 Badajoz ( SPAIN ) * * email: icacha@unex.es * * Teléfono: +34 924 289 300 Ext. 6826 Fax: +34 924 289 651 * *************************************************************************** * Usuario Linux: 8569 * * Para clave pública GnuPG: http://onsager.unex.es/firma.pub.asc * ***************************************************************************
participants (2)
-
Isidro Cachadiña Gutiérrez
-
Richard B. Kreckel