/// <summary> /// Adds given binary part of mantissa to arbitrary digit list as number in given positional numeral system. /// </summary> /// <param name="currently_Added_Binary_Position"></param> private void Add_Binary_Position(long currently_Added_Binary_Position) { byte Digit_List_Current = 0; bool is_Last_Loop; do { Digit_List[Digit_List_Current] += (byte)(currently_Added_Binary_Position % numeral_System); bool do_Push_Forward = Do_Push_Forward(Digit_List_Current); currently_Added_Binary_Position /= numeral_System; is_Last_Loop = currently_Added_Binary_Position < 1; if (++Digit_List_Current >= Digit_List.Count) { if (do_Push_Forward == true) { Digit_List.Add(1); } else if (is_Last_Loop == false) { Digit_List.Add(0); } } else if (do_Push_Forward == true) { Digit_List[Digit_List_Current]++; } } while (is_Last_Loop == false); }
/// <summary> /// Cutts off redundant digits beyond precition of floating point and smoths possible shifts /// of number coused by floating point migration consequently to numeral system. /// </summary> private void Cut_Off_Floating_Point_Migrants() { int cut_At = Digit_List.Count - precition + 3; if (cut_At >= 0) { cut_At = Smooth_To(cut_At); Digit_List = Digit_List.GetRange(cut_At, Digit_List.Count - cut_At); } Digit_List = Normalize(); }