Skip to content
Snippets Groups Projects
Commit eabee5bd authored by Alex D's avatar Alex D :mushroom: Committed by Matthew Pickering
Browse files

smallpt: truncate result

Current test does some floating-point manipulations which can be non-deterministic
due to different platforms/architectures. This change truncates the result to
avoid potential stdout mismatch.
parent 21bd91b7
No related branches found
No related tags found
1 merge request!55smallpt: truncate result
Pipeline #48377 passed
......@@ -222,5 +222,4 @@ main = do
vec <- smallpt w h samples
if mode == "img"
then writeImage stdout (w, h) vec
else hPutStr stdout (hashImage vec)
else hPutStr stdout (printf "%.6f" (read (hashImage vec) :: Double))
42517.5950581666
\ No newline at end of file
42517.595058
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment