From f1369d78968713326794f43eb586524ec3e255d2 Mon Sep 17 00:00:00 2001 From: Kaushlendra Pratap <41343571+Kaushl2208@users.noreply.github.com> Date: Tue, 10 Mar 2020 00:00:25 +0000 Subject: [PATCH] Updated the invalid Example in num.dart Closes #35400 Closes https://github.com/dart-lang/sdk/pull/40935 https://github.com/dart-lang/sdk/pull/40935 GitOrigin-RevId: a147cc095cf414431c7c9749a6ea4f53139c02da Change-Id: I3bbe858e4872be067abc710864fa130ac507ffa2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138792 Reviewed-by: Bob Nystrom --- sdk/lib/core/num.dart | 4 ++-- sdk_nnbd/lib/core/num.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart index dedc8d45109..89f5fb5f9b1 100644 --- a/sdk/lib/core/num.dart +++ b/sdk/lib/core/num.dart @@ -361,8 +361,8 @@ abstract class num implements Comparable { * 1.toStringAsFixed(3); // 1.000 * (4321.12345678).toStringAsFixed(3); // 4321.123 * (4321.12345678).toStringAsFixed(5); // 4321.12346 - * 123456789012345678901.toStringAsFixed(3); // 123456789012345683968.000 - * 1000000000000000000000.toStringAsFixed(3); // 1e+21 + * 123456789012345.toStringAsFixed(3); // 123456789012345.000 + * 10000000000000000.toStringAsFixed(4); // 10000000000000000.0000 * 5.25.toStringAsFixed(0); // 5 */ String toStringAsFixed(int fractionDigits); diff --git a/sdk_nnbd/lib/core/num.dart b/sdk_nnbd/lib/core/num.dart index f63dc68d5cf..55bb9106769 100644 --- a/sdk_nnbd/lib/core/num.dart +++ b/sdk_nnbd/lib/core/num.dart @@ -359,8 +359,8 @@ abstract class num implements Comparable { * 1.toStringAsFixed(3); // 1.000 * (4321.12345678).toStringAsFixed(3); // 4321.123 * (4321.12345678).toStringAsFixed(5); // 4321.12346 - * 123456789012345678901.toStringAsFixed(3); // 123456789012345683968.000 - * 1000000000000000000000.toStringAsFixed(3); // 1e+21 + * 123456789012345.toStringAsFixed(3); // 123456789012345.000 + * 10000000000000000.toStringAsFixed(4); // 10000000000000000.0000 * 5.25.toStringAsFixed(0); // 5 */ String toStringAsFixed(int fractionDigits);