소스 검색

testautomation: Don't expect exp to yield exact floating point results

In the Steam Runtime 1 'scout' environment, when compiling for i386
using the default gcc-4.6, Exp(34.125) matches the desired value to the
precision shown in the log (6 decimal places) but is not an exact match
for the desired value.

Signed-off-by: Simon McVittie <[email protected]>
Simon McVittie 1 년 전
부모
커밋
babca704e0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      test/testautomation_math.c

+ 1 - 1
test/testautomation_math.c

@@ -1092,7 +1092,7 @@ exp_regularCases(void *args)
         { 112.89, 10653788283588960962604279261058893737879589093376.0 },
         { 539.483, 1970107755334319939701129934673541628417235942656909222826926175622435588279443011110464355295725187195188154768877850257012251677751742837992843520967922303961718983154427294786640886286983037548604937796221048661733679844353544028160.0 },
     };
-    return helper_dtod("Exp", SDL_exp, regular_cases, SDL_arraysize(regular_cases));
+    return helper_dtod_inexact("Exp", SDL_exp, regular_cases, SDL_arraysize(regular_cases));
 }
 
 /* SDL_log tests functions */