open-index/open-npm huggingface dataset:
npm package: @influenceth/cairo-math-64x61
Description: Fixed point 64.61 math library for Cairo / Starknet
Author: Unstoppable Games, Inc.
Latest version: 1.2.0

[![npm version](https://badge.fury.io/js/@influenceth%2Fcairo-math-64x61.svg)](https://badge.fury.io/js/@influenceth%2Fcairo-math-64x61)

# Cairo Math 64x61

A fixed point 64.61 math library for Cairo & Starknet

## Usage ##
For use with `starknet-hardhat-plugin`, install via npm with `npm install --save-dev @influenceth/cairo-math-64x61` and add `./node_modules/@influenceth/cairo-math-64x61` to `cairoPaths` in your hardhat config (see https://github.com/Shard-Labs/starknet-hardhat-plugin#paths). Then you can import with, for example: `from contracts.Math64x61 import Math64x61_mul`

## Signed 64.61 Fixed Point Numbers ##
A signed 64.61-bit fixed point number is a fraction in which the numerator is a signed 125-bit integer and the denominator is 2^61. Since the denominator stays the same there is no need to store it (as in a floating point value).

64.61 is utilized as the 125 bit representation allows for overflow up to 2^125 * 2^125 (250 bits) during calculation taking advantage of Cairo's 251 bit felts.

Can represent values in the range of -2^64 to 2^64 with precision to 4.34e-19.

## Standard Library ##
`Math64x61` includes implementation of `add`, `sub`, `mul`, `div`, `sqrt`, `exp`, `ln`, `log2`, `log10`, and `pow` as well as conversion to / from felts and Uint256 values, `floor`, `ceil`, `min`, `max` and assertion methods.

## Trigonometry Library ##
`Trig64x61` includes implementation of `sin`, `cos`, `tan` and their inverses.

## Hyperbolic Library ##
`Hyp64x61` includes implementation of `sinh`, `cosh`, `tanh`, and their inverses.

## Vector Library ##
`Vec64x61` includes implementation of vector arithmetic (`add`, `sub`, `div`), dot product (`dot`), cross product (`cross`) and `norm`.

## Extensibility ##
This library strives to adhere to the OpenZeppelin extensibility pattern: https://github.com/OpenZeppelin/cairo-contracts/blob/main/docs/Extensibility.md
npm package: @influenceth/cubit
Description: Fixed point math for Cairo and Starknet
Author: Unstoppable Games, Inc.
Latest version: 1.0.0

# Cubit

![Workflow Tests Status](https://github.com/influenceth/cubit/actions/workflows/test.yaml/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/auditless/cairo-template/blob/main/LICENSE)

A fixed point math library in 64.64 and 32.32 representation built for Cairo & Starknet. Successor to [**`influenceth/cairo-math-64x61`**](https://github.com/influenceth/cairo-math-64x61)

Cubit is currently a WORK IN PROGRESS and should not be used in production (yet). Contributions are welcomed.

## Usage ##
Cubit was built with [**`auditless/cairo-template`**](https://github.com/auditless/cairo-template), reference its installation guide to install dependencies.

## Signed Fixed Point Numbers ##
A signed 64.64-bit fixed point number is a fraction in which the numerator is a signed 128-bit integer and the denominator is 2^64. Since the denominator stays the same there is no need to store it (as in a floating point value).

64.64 (`f128`) values can represent values in the range of -2^64 to 2^64 with precision to 1e-20.
32.32 (`f64`) values can represent vlaues in the range of -2^32 to 2^32 with precision to 1e-9.

## Core Library ##
All libraries in Cubit are referenced via the core type first, either `cubit::f64` or `cubit::f128`.

Within each library, the following functions are available:
`core` includes the following implementations for the `Fixed` type:
- `Add` (`+`)
- `AddEq` (`+=`)
- `Sub` (`-`)
- `SubEq` (`-=`)
- `Mul` (`*`)
- `MulEq` (`*=`)
- `Div` (`/`)
- `DivEq` (`/=`)
- `PartialEq` (`==`, `!=`)
- `PartialOrd` (`>`, `>=`, `<`, `<=`)
- `fixed.ceil`
- `fixed.exp`
- `fixed.floor`
- `fixed.ln`
- `fixed.log2`
- `fixed.log10`
- `fixed.pow`
- `fixed.round`
- `fixed.sqrt`

`trig` includes precise and fast versions of the following trigonometric functions:
- `fixed.cos`
- `fixed.cos_fast`
- `fixed.sin`
- `fixed.sin_fast`
- `fixed.tan`
- `fixed.tan_fast`
- `fixed.acos`
- `fixed.acos_fast`
- `fixed.asin`
- `fixed.asin_fast`
- `fixed.atan`
- `fixed.atan_fast`

## License

[MIT](https://github.com/influenceth/cubit/LICENSE) © [Unstoppable Games, Inc.](https://unstoppablegames.io)