Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Issue 12180022: Fix Issue 8259: dart:math pow broken for large integers. (Closed)

Created:
7 years, 10 months ago by srdjan
Modified:
7 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix Issue 8259: dart:math pow broken for large integers. Committed: https://code.google.com/p/dart/source/detail?r=18150

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -5 lines) Patch
M runtime/lib/double.cc View 1 2 1 chunk +6 lines, -5 lines 0 comments Download
A tests/standalone/pow_test.dart View 1 chunk +95 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
srdjan
7 years, 10 months ago (2013-02-04 23:31:33 UTC) #1
Vyacheslav Egorov (Google)
https://codereview.chromium.org/12180022/diff/1/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/12180022/diff/1/runtime/lib/double.cc#newcode84 runtime/lib/double.cc:84: if ((int64_val == static_cast<int64_t>(0x8000000000000000LL)) && I don't think we ...
7 years, 10 months ago (2013-02-05 00:34:36 UTC) #2
srdjan
Simplified by using BigintOperations. TODO: cleanup BigintOperations::ToMint to return Mint instead of int64_t . PTAL
7 years, 10 months ago (2013-02-05 00:55:58 UTC) #3
Vyacheslav Egorov (Google)
LGTM https://codereview.chromium.org/12180022/diff/5001/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/12180022/diff/5001/runtime/lib/double.cc#newcode83 runtime/lib/double.cc:83: if (BigintOperations::FitsIntoSmi(big)) return BigintOperations::ToSmi(big); This code is hard ...
7 years, 10 months ago (2013-02-05 17:30:28 UTC) #4
srdjan
7 years, 10 months ago (2013-02-05 18:04:08 UTC) #5
https://codereview.chromium.org/12180022/diff/5001/runtime/lib/double.cc
File runtime/lib/double.cc (right):

https://codereview.chromium.org/12180022/diff/5001/runtime/lib/double.cc#newc...
runtime/lib/double.cc:83: if (BigintOperations::FitsIntoSmi(big)) return
BigintOperations::ToSmi(big);
On 2013/02/05 17:30:28, Vyacheslav Egorov (Google) wrote:
> This code is hard to read. Can you make it 
> 
> if (...) {
>   return ...;
> } else if (...) {
>   return ...;
> }

Done.

Powered by Google App Engine
This is Rietveld 408576698