Buggy code:
, new double [ ] { 0.875 , 0.08585870722533433 } , new double [ ] { 1.0 , 0.0 } , new double [ ] { 1.125 , - 0.06002318412603958 } , new double [ ] { 1.25 , - 0.09827183642181316 } , new double [ ] { 1.375 , - 0.1177552707410788 } , new double [ ] { 1.5 , - 0.1207822376352452 } , new double [ ] { 1.625 , - 0.1091741337567954 } , new double [ ] { 1.75 , - 0.08440112102048555 } , new double [ ] { 1.875 , - 0.0476726853991883 } , new double [ ] { 2.0 , 0.0 } , new double [ ] { 2.125 , 0.05775985153034387 } , new double [ ] { 2.25 , 0.1248717148923966 } , new double [ ] { 2.375 , 0.2006984603774558 } , new double [ ] { 2.5 , 0.2846828704729192 } , new double [ ] { 2.625 , 0.3763336820249054 } , new double [ ] { 2.75 , 0.4752146669149371 } , new double [ ] { 2.875 , 0.5809359740231859 } , new double [ ] { 3.0 , 0.6931471805599453 } , new double [ ] { 3.125 , 0.811531653906724 } , new double [ ] { 3.25 , 0.9358019311087253 } , new double [ ] { 3.375 , 1.06569589786406 } , new double [ ] { 3.5 , 1.200973602347074 } , new double [ ] { 3.625 , 1.341414578068493 } , new double [ ] { 3.75 , 1.486815578593417 } , new double [ ] { 3.875 , 1.6369886482725 } , new double [ ] { 4.0 , 1.791759469228055 } , new double [ ] { 4.125 , 1.950965937095089 } , new double [ ] { 4.25 , 2.114456927450371 } , new double [ ] { 4.375 , 2.282091222188554 } , new double [ ] { 4.5 , 2.453736570842442 } , new double [ ] { 4.625 , 2.62926886637513 } , new double [ ] { 4.75 , 2.808571418575736 } , new double [ ] { 4.875 , 2.99153431107781 } , new double [ ] { 5.0 , 3.178053830347946 } , new double [ ] { 5.125 , 3.368031956881733 } , new double [ ] { 5.25 , 3.561375910386697 } , new double [ ] { 5.375 , 3.757997741998131 } , new double [ ] { 5.5 , 3.957813967618717 } , new double [ ] { 5.625 , 4.160745237339519 } , new double [ ] { 5.75 , 4.366716036622286 } , new double [ ] { 5.875 , 4.57565441552762 } , new double [ ] { 6.0 , 4.787491742782046 } , new double [ ] { 6.125 , 5.002162481906205 } , new double [ ] { 6.25 , 5.219603986990229 } , new double [ ] { 6.375 , 5.439756316011858 } , new double [ ] { 6.5 , 5.662562059857142 } , new double [ ] { 6.625 , 5.887966185430003 } , new double [ ] { 6.75 , 6.115915891431546 } , new double [ ] { 6.875 , 6.346360475557843 } , new double [ ] { 7.0 , 6.579251212010101 } , new double [ ] { 7.125 , 6.814541238336996 } , new double [ ] { 7.25 , 7.05218545073854 } , new double [ ] { 7.375 , 7.292140407056348 } , new double [ ] { 7.5 , 7.534364236758733 } , new double [ ] { 7.625 , 7.778816557302289 } , new double [ ] { 7.75 , 8.025458396315983 } , new double [ ] { 7.875 , 8.274252119110479 } , new double [ ] { 8.0 , 8.525161361065415 } , new double [ ] { 8.125 , 8.77815096449171 } , new double [ ] { 8.25 , 9.033186919605123 } , new double [ ] { 8.375 , 9.290236309282232 } , new double [ ] { 8.5 , 9.549267257300997 } , new double [ ] { 8.625 , 9.810248879795765 } , new double [ ] { 8.75 , 10.07315123968124 } , new double [ ] { 8.875 , 10.33794530382217 } , new double [ ] { 9.0 , 10.60460290274525 } , new double [ ] { 9.125 , 10.87309669270751 } , new double [ ] { 9.25 , 11.14340011995171 } , new double [ ] { 9.375 , 11.41548738699336 } , new double [ ] { 9.5 , 11.68933342079727 } , new double [ ] { 9.625 , 11.96491384271319 } , new double [ ] { 9.75 , 12.24220494005076 } , new double [ ] { 9.875 , 12.52118363918365 } , new double [ ] { 10.0 , 12.80182748008147 } , new double [ ] { 0.8 , 0.1520596783998376 } , new double [ ] { 100.0 , 359.1342053695754 } , new double [ ] { 1000.0 , 5905.220423209181 } , new double [ ] { 10000.0 , 82099.71749644238 } , new double [ ] { 100000.0 , 1051287.708973657 } , new double [ ] { 1000000.0 , 1.2815504569147613E7 } , new double [ ] { 1.0E7 , 1.511809493694739E8 } , new double [ ] { 1.0E8 , 1.7420680661038346E9 } , new double [ ] { 1.0E9 , 1.972326582750371E10 } , new double [ ] { 1.0E10 , 2.202585092888106E11 } } ; @ Test public void testLogGamma ( ) { <START_BUG> final int ulps = 130 ; <END_BUG> for ( int i = 0 ; i < ( GammaTest . LOG_GAMMA_REF . length ) ; i ++ ) { final double [ ] data = GammaTest . LOG_GAMMA_REF [ i ] ; final double x = data [ 0 ] ; final double expected = data [ 1 ] ; final double actual = Gamma . logGamma ( x ) ; final double tol ; if ( expected == 0.0 ) { tol = 1.0E-15 ; } else { tol = ulps * ( FastMath . ulp ( expected ) ) ; } Assert . assertEquals ( Double . toString ( x ) , expected , actual , tol ) ; } } private void checkRelativeError ( String msg , double expected , double actual , double tolerance ) { } }

Fix:
final int ulps = 3 ;