Skip to content

Decimal math produces rounding error #1120

@brs17

Description

@brs17

(1) Issue/Bug Description:
Utilizing the = calculator function in shell and attempting to do math with decimal places provides inaccurate rounding errors (yay javascript?)
calcmathbug

(2) Steps to reproduce (if you know):
Launch the shell launcher, =1.1-1, see incorrect answer (0.10000000000009)

(3) Expected behavior:
Expected to see 0.1.

(4) Distribution (run cat /etc/os-release):
Pop!_OS 21.04

(5) Gnome Shell version:
3.38.4-1ubuntu3~21.04.1ubuntu1pop1~1623339707~21.04~2a1865d

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

1.1.0~1627383380~21.04~475b49d

(7) Where was Pop Shell installed from:
Part of Pop!_OS installation

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):
2 x 1080p externals, both horizontal driven by laptop whose internal display is turned off.

(9) Other Installed/Enabled Extensions:
Only extensions included with Pop!_OS are currently installed

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