• Tor Didriksen's avatar
    Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY · 0b706e54
    Tor Didriksen authored
    Re-write the test, to make pushbuild green.
    Workaraound for broken pow() function on:
    SunOS tyr40 5.10 Generic_127112-05 i86pc i386 i86pc
    
    (dbx) where
    current thread: t@1
    =>[1] Item_func_pow::val_real(this = 0x238af20) (optimized), at 0xaa8d13 (line ~1980) in "item_func.cc"
    
    (dbx) print pow(1.01, 1.0)
    pow(1.01, 1) = 1.01
    (dbx) print pow(1.01, 10.0)
    pow(1.01, 10) = 1.1046221254112
    (dbx) print pow(1.01, 100.0)
    pow(1.01, 100) = 2.7048138294215
    (dbx) print pow(1.01, 1000.0)
    pow(1.01, 1000) = 20959.155637814
    (dbx) print pow(1.01, 10000.0)
    pow(1.01, 10000) = 1.635828711189e+43
    (dbx) print pow(1.01, 100000.0)
    pow(1.01, 100000) = Infinity
    (dbx) print pow(1.01, 1000000.0)
    pow(1.01, 1000000) = Infinity
    (dbx) print pow(1.01, 10000000.0)
    pow(1.01, 10000000) = Infinity
    (dbx) print pow(1.01, 100000000.0)
    pow(1.01, 100000000) = Infinity
    (dbx) print pow(1.01, 1000000000.0)
    pow(1.01, 1000000000) = 0.0
    (dbx) print pow(1.01, 10000000000.0)
    pow(1.01, 10000000000) = 0.0
    
    (dbx) print value
    value = 1.0111111111111
    (dbx) print val2
    val2 = 8796093022207.0
    
    (dbx) print pow(value, val2)
    pow(value, val2) = 0.0
    
    so it seems pow(1.01, y)
    returns Infinity for large y, but then starts to return 0.0 for even larger values of y.
    
    0b706e54
func_str.test 50.2 KB