Hi; As I said before, I think your issue comes from V8::FillHeapNumberWithRandom.
In src/v8.cc, in Object* V8::FillHeapNumberWithRandom(Object* heap_number), * 1st step: Remove / comment these lines and check the result of your Math.random() function. r->uint64_t_value |= random_bits; r->double_value -= binary_million; With this Math.random() should return a (non-random: 1048576.0) floating_point. * 2nd step: If the first step worked you are saved. uint64_t random_bits = Random(); is actually a 32bit value cast to a 64bit. Your endianness issue thus probably comes from r->uint64_t_value |= random_bits; Make sure you apply the "or" to the good part of your floating point value. It does not work as it currently is, so try r->uint64_t_value |= (random_bits << 32); and don't forget to uncomment the r->uint64_t_value |= random_bits I hope this works. Alexandre On Wed, Jan 12, 2011 at 1:14 PM, Guillaume <[email protected]> wrote: > Hi! > > I work with Julien, so I will answer as he isn't available this week. > > First, happy new year! > > We haven't made a lot of progress on this problem. > > Rodolph > we may upgrade our system in the future, but we can't do > this now in our project. > Alexandre > did you got time to have a look on this issue? > > Cheers, > Guillaume > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
