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

Large integers print as hex #303

Closed
DartBot opened this issue Nov 1, 2011 · 2 comments
Closed

Large integers print as hex #303

DartBot opened this issue Nov 1, 2011 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Nov 1, 2011

This issue was originally filed by rice@google.com


main() {
  print("9223372036854775807 = ${9223372036854775807}"); // 0x7fffffffffffffff = 2^63 - 1
  print("9223372036854775808 = ${9223372036854775808}"); // 0x8000000000000000 = 2^63
}

prints:

9223372036854775807 = 9223372036854775807
9223372036854775808 = 0x8000000000000000

I would not expect to see hex output unless I specifically requested it.

@ghost
Copy link

ghost commented Nov 1, 2011

This is a DartVM issue. The integer overflows into a BigInt which can currently be printed only in hex format.


Set owner to @sgmitrovic.
Removed Area-Library label.
Added Area-VM, Accepted labels.

@ghost
Copy link

ghost commented Nov 2, 2011

Fixed in r1058. Please note that used BN_bn2dec is very inefficient.


Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Nov 2, 2011
@DartBot DartBot assigned ghost Nov 2, 2011
copybara-service bot pushed a commit that referenced this issue Oct 19, 2023
…bdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (https://github.com/dart-lang/ecosystem/compare/dcbd2ee..4acfcaf):
  4acfcaf  2023-10-18  Devon Carew  depend on package:lints 3.0.0 (#187)

lints (https://github.com/dart-lang/lints/compare/90d350e..975c687):
  975c687  2023-10-17  Devon Carew  rev to 3.0.0; prep to publish (#160)

mockito (https://github.com/dart-lang/mockito/compare/47a5588..4edf86f):
  4edf86f  2023-10-18  Ilya Yanok  Change `!= null` to `is T` to handle "double nullable" case

tools (https://github.com/dart-lang/tools/compare/ddeccf6..15cc9c7):
  15cc9c7  2023-10-17  Elias Yishak  Add more info into the `AnalyticsException` (#181)

vector_math (https://github.com/google/vector_math.dart/compare/d54af8a..294896d):
  294896d  2023-10-18  Devon Carew  add a changelog entry for the most recent change (#290)
  2d6311e  2023-10-18  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#305)
  2c16283  2023-10-18  Kevin Moore  Allow latest pkg:build_web_compilers, bump min SDK to v3 (#299)
  cc8ca1c  2023-10-18  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.0 (#303)

watcher (https://github.com/dart-lang/watcher/compare/3998cdd..6ad58dc):
  6ad58dc  2023-10-19  Parker Lougheed  Migrate to dart_flutter_team_lints v2.1 (#153)

webdev (https://github.com/dart-lang/webdev/compare/8d48d5e..1bd434b):
  1bd434b6  2023-10-17  Elliott Brooks  Prepare DWDS for release to version 22.0.0 (#2254)
  c9e96b73  2023-10-16  Elliott Brooks  Run the Webdev tests daily with the Dart stable SDK (#2251)

Change-Id: I324913bfbdeb9d0d6afc38f8719cac5f5ffe9955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331204
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@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-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

1 participant