Re: Re: MySQL double

Mario Ruggier <[email protected]> Tue, 3 Feb 2004 16:17:56 +0100
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
Hi folks,

>         Hi,
>
> Ralf Sigmund <[email protected]> wrote:
>> Greetings!
>>
>> I have recently started to use modeling for my bioinformatics work.
>> I like it a lot but now i ran into a small problem.
>> I often need to store small numbers like 1.24e-127
>> The MySQL datataype double stores theese correctly while float  
>> reduces them to
>> 0.0 which is a catastrophe for me.
>> So I tried to specify double as external datatayp, but the  
>> mdl-validate fails
>> telling me that  double is not supported.
>> Is it possible to expand the mysql adapter to support double?
>
>   Absolutely :)  Apply the attached patch and you should be able to use
>   MySQL's DOUBLE. Use precision=0, scale=0 for the default DOUBLE, or
>   precision=M, scale=D for DOUBLE(M,D). If you can report that this
>   works as expected, this will be in the next release.

wouldn't this be an appropriate case for using FixedPoint? As per:
<http://modeling.sourceforge.net/UserGuide/attribute-custom-type- 
example.html>
Or are there other reasons, maybe performance?, for not doing so?

Cheers, mario

>         Hope this helps,
>
> -- Sébastien.



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn