Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MPFR trans functions #249

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Add MPFR trans functions #249

merged 6 commits into from
Oct 15, 2024

Conversation

rsoeldner
Copy link
Member

Based on https://github.com/kadena-io/pact/pull/1045/files#diff-9619507e39a18e5493fafa72986db085aebadb61dc76aac3396fc34e30d38623

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • (If Relevant) Documentation has been (manually) updated at https://docs.kadena.io/pact

Additionally, please justify why you should or should not do the following:

  • Benchmark regressions
  • Confirm replay/back compat (Ignore until core release)
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact (Ignore until core release)

@jmcardon
Copy link
Member

jmcardon commented Oct 9, 2024

I actually want to get #250 in before this one.

Essentially: I am still tweaking gas a bit, and that PR allows for gassing pow in an unbounded fashion. As is, we can't merge MPFR without it I think

let result = Musl.trans_logBase (dec2F base) (dec2F arg)
guardNanOrInf info result
returnCEKValue cont handler (VLiteral (LDecimal (f2Dec result)))
result <- guardNanOrInf info $ MPFR.mpfr_log base arg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

args -> argsError info b args
where
checkArgAndCompute n = do
when (n <= 0) $ throwExecutionError info (ArithmeticException "Natural logarithm must be greater then 0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rsoeldner rsoeldner merged commit cddecba into master Oct 15, 2024
13 checks passed
@rsoeldner rsoeldner deleted the rsoeldner/mpfr branch October 15, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants