Truncation error

Meghna Karkera mkarkera98 at gmail.com
Wed Oct 7 03:59:26 EDT 2020


When I use the same code in MATLAB I get the answer as 4.6e-06 and when I
use the same code in PYTHON I get the answer as 4.7e-06. How do I know
which is the most precise and accurate value. Actually the answer is a big
matrix, I've only compared the first entry of the matrix.

On Wed, Oct 7, 2020, 11:24 Marco Sulla <Marco.Sulla.Python at gmail.com> wrote:

> If you want to avoid float problems, you can use Decimal:
>
> https://docs.python.org/3/library/decimal.html
>
> On Wed, 7 Oct 2020 at 05:23, Meghna Karkera <mkarkera98 at gmail.com> wrote:
> >
> > How is PYTHON better than other software's(MATLAB) in case of truncation
> or
> > rounding off error.
> >
> > Thanks
> > Meghna
> > --
> > https://mail.python.org/mailman/listinfo/python-list
>


More information about the Python-list mailing list