Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pkova
Copy link
Collaborator

@pkova pkova commented Jun 10, 2025

No description provided.

Fang- and others added 14 commits March 22, 2025 16:38
+pow performance degrades rapidly as the exponent grows. Here we replace
the +sqt implementation that calls +pow with one that uses the
Newton-Raphson method. This gives way better performance, and more
accurate results to boot.

Before:

```hoon
> ~>  %bout  (sqt:rd:lm .~1e-2)
.~0.10000000022017597   ::  took ms/181.095
> ~>  %bout  (sqt:rd:lm .~1e-3)
.~0.03162277732556293   ::  took s/10.576.252
> ~>  %bout  (sqt:rd:lm .~1e-4)
.~0.010000002308497298  ::  took s/743.265.918
> ~>  %bout  (sqt:rd:lm .~1e2)
.~9.999999977324386     ::  took ms/181.242
> ~>  %bout  (sqt:rd:lm .~1e3)
.~31.622775866034136    ::  took s/10.573.055
```

After:

```hoon
> ~>  %bout  (sqt:rd:lm .~1e-2)
.~0.09999999999999999   ::  took µs/80
> ~>  %bout  (sqt:rd:lm .~1e-3)
.~0.03162277660168379   ::  took µs/78
> ~>  %bout  (sqt:rd:lm .~1e-4)
.~0.01                  ::  took µs/105
> ~>  %bout  (sqt:rd:lm .~1e2)
.~10                    ::  took µs/114
> ~>  %bout  (sqt:rd:lm .~1e3)
.~31.622776601683793    ::  took µs/73
```
Implements +asin, +acos and +atan. The former two are implemented in
terms of the latter, which is implemented as a Taylor expansion.

We also include the two-argument variant of +atan, +atan2, for
completeness.
To keep the numericists at ease.
Merge master back to develop
ames: add %tune to $sign to not break old queued-events
The runtime makes the http requests for double boot protection using the standard C `%d` format but the endpoint in eyre expects the bone to be `@ud` formatted. This causes a mismatch if the ping-bone is larger than 1000, causing double boot protection to become disabled. We address the mismatch in arvo instead of vere because this is easier to release.
math: better +sqt with newton's method
math: inverse trigonometric functions
eyre: fix double boot protection bone format
@pkova pkova merged commit f170eb9 into master Jun 10, 2025
3 checks passed
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.

4 participants