From 0cc04374af4bae2e2130ca10b8efd6fa9903e1c9 Mon Sep 17 00:00:00 2001 From: Matthew Dooley Date: Sat, 16 May 2020 00:38:38 -0400 Subject: [PATCH] Updates GPU accuracy Removing the early return increased accuracy range by 1. --- Closed-form Fibonacci on GPU/main.swift | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Closed-form Fibonacci on GPU/main.swift b/Closed-form Fibonacci on GPU/main.swift index 8e8c006..c6260f9 100644 --- a/Closed-form Fibonacci on GPU/main.swift +++ b/Closed-form Fibonacci on GPU/main.swift @@ -6,7 +6,7 @@ // Copyright © 2020 Matthew Dooley. All rights reserved. // // CPU accurate (0, 70] then datatypes start to become annoying -// GPU accurate (0, 32] then datatypes start to become annoying +// GPU accurate (0, 33] then datatypes start to become annoying // import Foundation @@ -110,7 +110,7 @@ if Config.cpu { } } } else { - // accurate up to and including 32 + // accurate up to and including 33 print("Calculating with GPU") let device: MTLDevice = MTLCreateSystemDefaultDevice()! diff --git a/README.md b/README.md index 6289126..f21e758 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ To run on the CPU instead include the CPU flag: ## Limitations The CPU calculations (using the --cpu flag) are only accurate in the range (0, 70]. -The GPU calculations are only accurate in the range (0, 32]. +The GPU calculations are only accurate in the range (0, 33]. ## Improvements This project could be improved by implementing a arbitrary-precision arithmetic.