Skip to content
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

Define int.MIN_SAFE and int.MAX_SAFE #455

Closed
DartBot opened this issue Nov 15, 2011 · 4 comments
Closed

Define int.MIN_SAFE and int.MAX_SAFE #455

DartBot opened this issue Nov 15, 2011 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue

Comments

@DartBot
Copy link

DartBot commented Nov 15, 2011

This issue was originally filed by kresten...@gmail.com


It would be good to have constants defining the "safe integer range", i.e. the range of integers that can be expected to be precise in both DartVM and when compiled to JavaScript: -2^53 ... (2^53)-1

@DartBot
Copy link
Author

DartBot commented Nov 15, 2011

This comment was originally written by drfibonacci@google.com


Added Area-Language, Triaged labels.

@floitschG
Copy link
Contributor

Removed Area-Language label.
Added Area-Library label.

@vsmenon
Copy link
Member

vsmenon commented Nov 17, 2011

We ran into a somewhat related issue porting a graph / shortest path algorithm to Dart. It's convenient to use something like MAX_INT as an initial value (essentially representing infinity) for iterative algorithms.

@lrhn
Copy link
Member

lrhn commented Apr 18, 2013

The Dart integer type does not have a max or min value.
The safe range for the current dart2js implementation of integers should not be visible in the library - it's effectively a bug in dart2js that it doesn't have arbitrary precision integers. I believe some work is being done to make the VM warn about numbers outside that range.


Added WontFix label.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Apr 18, 2013
@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue and removed resolution-wont_fix labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Sep 21, 2022
Changes:
```
> git log --format="%C(auto) %h %s" 32a9450..87e4c68
 https://dart.googlesource.com/markdown.git/+/87e4c68 Bump to 6.0.1 (#462)
 https://dart.googlesource.com/markdown.git/+/37305cf Add deprecated accessors for indicatorForUncheckedCheckBox and indicatorForCheckedCheckBox (#459)
 https://dart.googlesource.com/markdown.git/+/2e5e347 lint cleanup (#456)
 https://dart.googlesource.com/markdown.git/+/a0b5a05 example: small tweak to example – add Dart code (#455)
 https://dart.googlesource.com/markdown.git/+/de32a69 visitText to use textContent getter so subclassing Text class works correctly. (#431)
 https://dart.googlesource.com/markdown.git/+/8247955 Rewrite checkbox(task list) extension (#450)
 https://dart.googlesource.com/markdown.git/+/a602760 Fix crash with mixed checkbox lists (#449)

```

Diff: https://dart.googlesource.com/markdown.git/+/32a94505ded3863b82310b86344a003a19c00341~..87e4c689342d5bbaa84ba2999abf0bff503979be/
Change-Id: I92cf05fe6057e1b3eda8da09fc4eac4f67dd47ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260441
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

5 participants