Skip to content

More mpmath questions #39

Description

@edbennett

@LupoA A couple of issues probably mostly demonstrating my ignorance about mpmath. Looking at https://github.com/LupoA/rhos/blob/feature/GP/rhos/core.py

  • Obviously (given your comment on line 50), the syntax using mp. operations for every arithmetic operation is very cumbersome. What's the reasoning behind using that syntax? Based on my skim-read of the documentation, if a and b are both mpf objects (which most of your code is careful to ensure), then a - b should give the same result as mp.fsub(a, b). Being able to use standard arithmetic notation would make this vastly more readable.
  • Is there a reason that on e.g. line 14, you use mp.fadd(mpf(i), mpf(j)) rather than mpf(i + j), given that i and j are both integers so addition is exact?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions