-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Andreas Flack wrote: > > Here's two anomalies: > > DB: 80.3, Midgard value: 80,300003 > DB: 1736.40649, Midgard value: 1736.406494 > > The dbtype of the property is double, the type is float. The same thing > happens when both dbtype and type are set to float. Plus, it happens > with straight Midgard objects (on 1.8.4, PHP5.2, Debian Testing and > openSuse 10.2), i.e. it doesn't seem to have anything to do with MidCOM. >
AFAIK MgdSchema treats type="float" as type="double" (since that's what people usually mean) but you could try specifying it as double in the mgdschema. Piotras should be able to elaborate. > > So if someone knows anything I could try, please let me know, the only > workaround I can think of right now would be to set the property type to > text and then cast the value back to float in my component code, which > would be a bit too messy, really. > Might not help you much actually as it's the casting the float that likely is the problem here and I'm not sure if it makes much difference whether it's made by Midgard core or PHP unless PHP has some special magick there. In general doing high-precision math is not something to be done with floats but the arbitary precision types. /Rambo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5Ofei7iLtQbxbW8RA/wpAJsGIVVktNmmqrqzLi/EQpQnoool8wCgsx8/ 95HtXCz0zmcN+GDEOzpj1QU= =RfEz -----END PGP SIGNATURE----- _______________________________________________ user mailing list [email protected] http://lists.midgard-project.org/mailman/listinfo/user
