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

Chore/update deps and fmt #637

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description = "ONNX Runtime in Cairo for verifiable ML inference using STARK"
homepage = "https://github.com/gizatechxyz/orion"

[dependencies]
alexandria_merkle_tree = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "800f5ad" }
alexandria_data_structures = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "800f5ad" }
alexandria_sorting = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "800f5ad" }
cubit = { git = "https://github.com/influenceth/cubit.git", rev = "6275608" }
alexandria_merkle_tree = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "0aa7cca" }
alexandria_data_structures = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "0aa7cca" }
alexandria_sorting = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "0aa7cca" }
cubit = { git = "https://github.com/influenceth/cubit.git", rev = "8eacc2b" }

[scripts]
sierra = "cairo-compile . -r"
Expand Down
32 changes: 0 additions & 32 deletions src/numbers.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -1760,38 +1760,6 @@ impl I8IntoFP16x16 of Into<i8, FP16x16> {
}
}

impl I8IntoFP64x64 of Into<i8, FP64x64> {
fn into(self: i8) -> FP64x64 {
let number_sign: bool = self < 0;
let mut self_positive: i8 = self;

if number_sign {
self_positive = self_positive * -1_i8
}

let number_felt: felt252 = self_positive.into();
let number_u128: u128 = number_felt.try_into().unwrap();

FP64x64 { mag: number_u128 * ONE_fp64x64, sign: number_sign }
}
}

impl I8IntoFP32x32 of Into<i8, FP32x32> {
fn into(self: i8) -> FP32x32 {
let number_sign: bool = self < 0;
let mut self_positive: i8 = self;

if number_sign {
self_positive = self_positive * -1_i8
}

let number_felt: felt252 = self_positive.into();
let number_u128: u64 = number_felt.try_into().unwrap();

FP32x32 { mag: number_u128 * ONE_fp32x32, sign: number_sign }
}
}

impl I16Number of NumberTrait<i16, i16> {
fn new(mag: i16, sign: bool) -> i16 {
if sign {
Expand Down
Loading
Loading