#17 Float support

open
nobody
None
5
2008-04-05
2008-04-05
baylor wetzel
No

After reading everything i could find, i am giving up on trying to figure out how to use floating point numbers as a value with Judy. Either Judy does not support float, double, etc (which i find hard to believe) or the documentation doesn't make it clear how to do so (i looked for hours and i've got a PhD so i think it's fair to say that the learning curve is a bit too steep)

Technically, Judy stores the floats but it keeps only the integer part, truncating the rest

So my feature request: either modify Judy to allow the value to be a floating point number or put up a simple example or documentation on how to do so

Thanks

Discussion

  • Logged In: NO

    I am sure you are not a computer PhD.
    the C code used to store 'float' in 'int' is:
    float b=10.3;
    int a;
    a=(*(int*)&b);
    ///inversely , get the float back from int is:
    float c;
    c=(*(float*)&a);
    ///here c== 10.3;
    some one passby