> > What do you think is best - try to adapt that version, or > update our > > regression tests outputs to accept the output from our current code? > > Given that our output gets very very close, perhaps we should > take a hint from the end of the MinGW version, do a single > Newton iteration to fixup those last few digits. > > Adding this before the last line of our version of cbrt(): > > tmpres -= ( tmpres - (x/(tmpres*tmpres)) )*0.33333333333333333333; > > Makes it give the same result as my system version...
That totally didn't work on visual c++ at least. It fixes those two ones, but it breaks the other lines in the same test: *** ./expected/float8-exp-three-digits-win32.out Wed Jun 8 23:15:29 2005 --- ./results/float8.out Mon Apr 24 21:57:40 2006 *************** *** 321,329 **** SELECT '' AS five, f.f1, ||/f.f1 AS cbrt_f1 FROM FLOAT8_TBL f; five | f1 | cbrt_f1 ------+----------------------+----------------------- ! | 0 | 0 | 1004.3 | 10.014312837827 ! | -34.84 | -3.26607421344208 | 1.2345678901234e+200 | 4.97933859234765e+066 | 1.2345678901234e-200 | 2.3112042409018e-067 (5 rows) --- 321,329 ---- SELECT '' AS five, f.f1, ||/f.f1 AS cbrt_f1 FROM FLOAT8_TBL f; five | f1 | cbrt_f1 ------+----------------------+----------------------- ! | 0 | NaN | 1004.3 | 10.014312837827 ! | -34.84 | -1.08869140448069 | 1.2345678901234e+200 | 4.97933859234765e+066 | 1.2345678901234e-200 | 2.3112042409018e-067 (5 rows) //Magnus ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster