oldk1331 wrote:
> 
> (3) -> hash 1.0
> Function:  hashUpdate! : (HashState,%) -> HashState is missing from
> domain: Float
>    Internal Error
>    The function hashUpdate! with signature (HashState)(HashState)$ is
>       missing from domain Float
> 
> 
> Currently Float is represented by 2 parts:
> 
> (1) -> (log10 100) pretend SEX
> 
>    (1)  (147573952589676412928 . - 66)
> 
> (2) -> factor 147573952589676412928
> 
>          67
>    (2)  2
> 
> 
> The representation can vary when "bits" changed:
> (1) -> bits(10)
> 
>    (1)  68
> 
> (2) -> (log10 100) pretend SEX
> 
>    (2)  (512 . - 8)
> 
> 
> Equal values should have equal hash.  I want to know
> for "Rep := Record( mantissa : I, exponent : I )", we take
> the hash of (mantissa/2^exponent), is that good?

Well, hashing floating point values rarely will give sensible
results.  Basically computing "the same" expression second
time may give different value.  The best you can hope is
that value stored in a variable will give you consistent
hash.  Treating values as exact rationals will do.


-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to