-
-
Notifications
You must be signed in to change notification settings - Fork 31
fix: Big int handling #1758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Big int handling #1758
Changes from 5 commits
0d81849
0ff84bb
a3e9c1c
626b21c
6d44004
dee3d74
e3b18bf
fc6025b
18efe1a
c7f60c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,9 @@ export function getTypeForIndexAccess( | |
| } | ||
|
|
||
| export function numericLiteralToSnippet(value: number): Snippet { | ||
| if (Math.abs(value) > 2 ** 63) { | ||
|
||
| return snip(value, abstractFloat); | ||
| } | ||
| // WGSL AbstractInt uses 64-bit precision, but JS numbers are only safe up to 2^53 - 1. | ||
| // Warn when values exceed this range to prevent precision loss. | ||
| if (Number.isInteger(value)) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.