#NEWLINE# def get_next_double( context , builder , state_ptr ) : #NEWLINE# #INDENT# '\n    Get the next double generated by the PRNG at *state_ptr*.\n    ' #NEWLINE# a = builder . lshr ( get_next_int32 ( b , builder , state_ptr ) , const_int ( 5 ) ) #NEWLINE# b = builder . lshr ( get_next_int32 ( context , builder , state_ptr ) , const_int ( 6 ) ) #NEWLINE# a = builder . uitofp ( a , double ) #NEWLINE# b = builder . uitofp ( b , double ) #NEWLINE# return builder . fdiv ( builder . fadd ( b , builder . fmul ( a , ir . Constant ( double , 67108864.0 ) ) ) , ir . Constant ( double , 9007199254740992.0 ) )