Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
David Martínez authored and David Martínez committed Oct 12, 2020
1 parent 41194d1 commit 2b659fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ evaluate(`4 >= ${Math.PI}`); // true
Valid tokens:
- Parenthesis: (,)
- Number: Decimal, integer or scientific e-notation
- Operator: Arithmetic +,-,/,\*,\*\* Relational =\=\=,=\=,!==,!=,<,>,<=,>=
- Operator: Arithmetic +,-,/,*,** Relational =\=\=,=\=,!==,!=,<,>,<=,>=

### Change precision
```typescript
import { BigFloat, set_precision } from "https://deno.land/x/bigfloat/mod.ts";
Expand All @@ -61,13 +62,15 @@ new BigFloat(2).sqrt().toString(); // "1.4142"
set_precision(-10);
new BigFloat(2).sqrt().toString(); // "1.4142135623"
```

### The bigfloat object
```typescript
interface IBigFloat {
coefficient: bigint;
exponent: number;
}
```

Valid bigfloat made from primitives:
```typescript
const bigfloat: IBigFloat {
Expand Down

0 comments on commit 2b659fd

Please sign in to comment.