Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
suleyman-kaya committed Aug 4, 2024
1 parent 232f937 commit 3ce667b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions poly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ with real coefficients (of any order). The functions are declared in the module

## Polynomial Evaluation

```v ignore
fn eval(c []f64, x f64) f64
```

The functions described here evaluate the polynomial

```console
Expand All @@ -15,14 +19,6 @@ P(x) = c[0] + c[1] x + c[2] x^2 + . . . + c[len-1] x^(len-1)

using Horner's method for stability.

```v ignore
fn eval(c []f64, x f64) f64
```

This function evaluates a polynomial and its derivatives, storing the results in the array
`res` of size `lenres`. The output array contains the values of `d^k P(x)/d x^k` for the
specified value of `x`, starting with `k = 0`.

```v ignore
fn eval_derivs(c []f64, x f64, lenres u64) []f64
```
Expand Down

0 comments on commit 3ce667b

Please sign in to comment.