wip dashu move

This commit is contained in:
Fayeed Pawaskar
2023-07-17 20:40:41 +05:30
parent 5d09449c95
commit cf345d8174
17 changed files with 165 additions and 38 deletions

View File

@@ -6,7 +6,7 @@ use crate::machine::loader::*;
use crate::machine::machine_errors::CompilationError;
use crate::machine::preprocessor::*;
use crate::parser::ast::*;
use crate::parser::rug::Rational;
use crate::parser::dashu::{Rational, Integer};
use crate::variable_records::*;
use indexmap::{IndexMap, IndexSet};
@@ -236,7 +236,7 @@ fn merge_branch_seq<Iter: Iterator<Item = BranchInfo>>(branches: Iter) -> Branch
branch_info.chunks.extend(branch.chunks.drain(..));
}
branch_info.branch_num.delta *= 2;
branch_info.branch_num.delta = branch_info.branch_num.delta * Integer::from(2);
branch_info.branch_num.branch_num -= &branch_info.branch_num.delta;
branch_info