Skip to content

irr() providing different results on ARM and x86 CPUs #37

@millettmb

Description

@millettmb

Hi all,
I've got two machines set up, my local development machine (i7-10510U), and an AWS EC2 instance (c6g.16xlarge, Arm-based AWS Graviton2). On both machines, the same version of Python (3.8.5) and numpy_financial (1.0.0) are installed. Both machines are running Ubuntu 20.04 LTS, with my local machine running kernel 5.8.0-43-generic and the AWS machine running 5.4.0-1037-aws.

I run the following code on both machines:

import numpy_financial
test_cashflow = [-20, 2, 3, 4, 5, 4, 3, 2]
numpy_financial.irr(test_cashflow)

On my local development machine (x86), the result given is 0.03603774756546363, whereas on the AWS EC2 Arm-based instance, the result given is 0.08389095415117676. I've also run the same code on an AWS EC2 t2.medium instance (x86 based) and was given the same result as my local development machine (0.036...)

If I provide the same input into the MS Excel IRR function, the result given is 3.6%, matching the x86 outputs. This leads me to believe that there's an issue occurring with the ARM package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions