Skip to content

Commit

Permalink
Updates GPU accuracy
Browse files Browse the repository at this point in the history
Removing the early return increased accuracy range by 1.
  • Loading branch information
marzvrover committed May 16, 2020
1 parent 77114d6 commit 0cc0437
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Closed-form Fibonacci on GPU/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0cc0437

Please sign in to comment.