mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
Commented out code removal
This commit is contained in:
parent
01fef70143
commit
158ae35da5
2 changed files with 0 additions and 92 deletions
|
@ -101,70 +101,6 @@ pub fn arrnum_int_div_step(
|
|||
remainder: rem_out,
|
||||
}
|
||||
}
|
||||
// pub struct ArrFloat {
|
||||
// pub leading_zeros: u8,
|
||||
// pub values: Vec<u8>,
|
||||
// pub basenum: u8
|
||||
// }
|
||||
//
|
||||
// pub struct ArrFloatDivOut {
|
||||
// pub quotient: u8,
|
||||
// pub remainder: ArrFloat
|
||||
// }
|
||||
//
|
||||
// pub fn arrfloat_int_div(
|
||||
// arrfloat_in : &ArrFloat,
|
||||
// base_ten_int_divisor : u8,
|
||||
// precision : u16
|
||||
// ) -> DivOut {
|
||||
//
|
||||
// let mut remainder = ArrFloat {
|
||||
// basenum: arrfloat_in.basenum,
|
||||
// leading_zeros: arrfloat_in.leading_zeroes,
|
||||
// values: Vec<u8>::new()
|
||||
// }
|
||||
// let mut quotient = 0;
|
||||
//
|
||||
// let mut bufferval : u16 = 0;
|
||||
// let base : u16 = arrfloat_in.basenum as u16;
|
||||
// let divisor : u16 = base_ten_int_divisor as u16;
|
||||
//
|
||||
// let mut it_f = arrfloat_in.values.iter();
|
||||
// let mut position = 0 + arrfloat_in.leading_zeroes as u16;
|
||||
// let mut at_end = false;
|
||||
// while position< precision {
|
||||
// let next_digit = match it_f.next() {
|
||||
// Some(c) => {}
|
||||
// None => { 0 }
|
||||
// }
|
||||
// match u_cur {
|
||||
// Some(u) => {
|
||||
// bufferval += u.clone() as u16;
|
||||
// if bufferval > divisor {
|
||||
// while bufferval >= divisor {
|
||||
// quotient+=1;
|
||||
// bufferval -= divisor;
|
||||
// }
|
||||
// if bufferval == 0 {
|
||||
// rem_out.position +=1;
|
||||
// } else {
|
||||
// rem_out.replace = Some(bufferval as u8);
|
||||
// }
|
||||
// break;
|
||||
// } else {
|
||||
// bufferval *= base;
|
||||
// }
|
||||
// },
|
||||
// None => {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// u_cur = it_f.next().clone();
|
||||
// rem_out.position+=1;
|
||||
// }
|
||||
// ArrFloatDivOut { quotient: quotient, remainder: remainder }
|
||||
// }
|
||||
//
|
||||
pub fn arrnum_int_add(arrnum: &[u8], basenum: u8, base_ten_int_term: u8) -> Vec<u8> {
|
||||
let mut carry: u16 = u16::from(base_ten_int_term);
|
||||
let mut rem: u16;
|
||||
|
|
|
@ -52,34 +52,6 @@ fn get_primitive_hex(
|
|||
) -> FormatPrimitive {
|
||||
let prefix = Some(String::from(if inprefix.sign == -1 { "-0x" } else { "0x" }));
|
||||
|
||||
// assign the digits before and after the decimal points
|
||||
// to separate slices. If no digits after decimal point,
|
||||
// assign 0
|
||||
//let (mut first_segment_raw, second_segment_raw) = match analysis.decimal_pos {
|
||||
//Some(pos) => (&str_in[..pos], &str_in[pos + 1..]),
|
||||
//None => (str_in, "0"),
|
||||
//};
|
||||
//if first_segment_raw.is_empty() {
|
||||
//first_segment_raw = "0";
|
||||
//}
|
||||
// convert to string, hexifying if input is in dec.
|
||||
// let (first_segment, second_segment) =
|
||||
// match inprefix.radix_in {
|
||||
// Base::Ten => {
|
||||
// (to_hex(first_segment_raw, true),
|
||||
// to_hex(second_segment_raw, false))
|
||||
// }
|
||||
// _ => {
|
||||
// (String::from(first_segment_raw),
|
||||
// String::from(second_segment_raw))
|
||||
// }
|
||||
// };
|
||||
//
|
||||
//
|
||||
// f.pre_decimal = Some(first_segment);
|
||||
// f.post_decimal = Some(second_segment);
|
||||
//
|
||||
|
||||
// TODO actual conversion, make sure to get back mantissa.
|
||||
// for hex to hex, it's really just a matter of moving the
|
||||
// decimal point and calculating the mantissa by its initial
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue