title: Dart calculation or rounding error for math results where result length is 19?
body: <p>I have a simple code to test math in dart:</p>
  <pre><code> import 'package:flutter/material.dart';
  
  final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
        debugShowCheckedModeBanner: false,
        home: Scaffold(
          body: Center(
            child: Test(),
          ),
        ),
      );
    }
  }
  
  class Test extends StatefulWidget {
  
    @override
    _TestState createState() =&gt; _TestState();
  }
  
  class _TestState extends State&lt;Test&gt; {
    final TextEditingController t1 = TextEditingController();
    final TextEditingController t2 = TextEditingController();
    
  //   static var f = NumberFormat('#,##,###.##', 'en_IN');
    static String displayResult = '';
    
    void math(){
      setState(() {
        double n1 = double.parse(t1.text);
        double n2 = double.parse(t2.text);
  
        double result = n1 * n2 / 100;
        print(result);
        displayResult = result.toStringAsFixed(2);  
      });
      
      
    }
    @override
    Widget build(BuildContext context) {
      return Column(
        children: [
          TextField(
            controller: t1,
            
          ),
          TextField(
            controller: t2,
          ),
          Text(
            displayResult
          ),
          ElevatedButton(
          child: Text('DO Math'),
            onPressed: math,),
          
        ],
      );
    }
  }
  </code></pre>
  <p>When I type the following value:</p>
  <pre><code>t1 = 586665578588 &amp; t2 = 999999999
  </code></pre>
  <p>The result output is:
  <a href="https://i.stack.imgur.com/VYkcM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VYkcM.png" alt="enter image description here" /></a></p>
  <p>The print to console before converting the above result toStringAsFixed(2) give the result as:</p>
  <p><a href="https://i.stack.imgur.com/zz3sE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zz3sE.png" alt="enter image description here" /></a></p>
  <p>The console output matches to the calculation in excel as well. But the conversion to string somehow alters the number.</p>
  <p>I tried an online calculator and the results are bit different:</p>
  <p><a href="https://i.stack.imgur.com/12CHx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/12CHx.png" alt="enter image description here" /></a></p>
  <p>Can you please help me why we see different values as output.</p>