Re: [Modeling-users] Re: MySQL double
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2004-02-03 15:18:00
|
Hi folks, > Hi, > > Ralf Sigmund <ral...@ip...> 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 =20 >> reduces them to >> 0.0 which is a catastrophe for me. >> So I tried to specify double as external datatayp, but the =20 >> 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=3D0, scale=3D0 for the default DOUBLE, = or > precision=3DM, scale=3DD 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-=20 example.html> Or are there other reasons, maybe performance?, for not doing so? Cheers, mario > Hope this helps, > > -- S=E9bastien. |