/***********************************************************************************
 * Chaga string arithmetic library                                                 *
 * Copyright (C) 2026 Robert James Bruce                                           *
 *                                                                                 *
 * This file is part of the Chaga string arithmetic library.                       *
 *                                                                                 *
 * The Chaga string arithmetic library is free software: you can redistribute it   * 
 * and/or modify it under the terms of the GNU General Public License as published *
 * by the Free Software Foundation, either version 3 of the License, or (at your   *
 * option) any later version.                                                      *
 *                                                                                 *
 * The Chaga string arithmetic library is distributed in the hope that it will be  *
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public *
 * License for more details.                                                       *
 *                                                                                 *
 * You should have received a copy of the GNU General Public License               *
 * along with the Chaga compiler. If not, see <https://www.gnu.org/licenses/>.     *
 ***********************************************************************************/
#ifndef LIBCHAGA_PACKED_STRING_REAL_FUNCTIONS
#define LIBCHAGA_PACKED_STRING_REAL_FUNCTIONS 1
#endif

#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>

#ifndef LIBCHAGA_CONSTANTS
#include "libchaga-constants.h"
#endif

#ifndef LIBCHAGA_DATA_STRUCTURES
#include "libchaga-data_structures.h"
#endif

#ifndef LIBCHAGA_GENERAL_FUNCTIONS
#include "libchaga-general_functions.h"
#endif



psreal * packed_string_real_release_memory (psreal *);
psreal * packed_string_real_component_release_memory (psreal *);
psreal * packed_string_real_set_sign (psreal *, enum string_number_sign);
psreal * packed_string_real_initialize_to_zero (psreal *);
psreal * packed_string_real_initialize_to_undefined (psreal *);
psnc * packed_string_real_append_one_digit_left_of_decimal (psnc *, unsigned char);
psnc * packed_string_real_append_two_digits_left_of_decimal (psnc *, unsigned char);
psnc * packed_string_real_append_one_digit_right_of_decimal (psnc *, unsigned char);
psnc * packed_string_real_append_two_digits_right_of_decimal (psnc *, unsigned char);
psnc * packed_string_real_append_number_block_right_of_decimal_in_stack_order (psnc *, unsigned char *, int, enum occupied_nibble);
psreal * packed_string_real_copy_number (psreal *, psreal *);
psreal * packed_string_real_set_value (psreal *, char *);
void packed_string_real_display (psreal *, int);
int packed_string_real_determine_absolute_value_larger_of_two_reals (psreal *, psreal *);
psint * copy_packed_string_real_digits_into_packed_string_integer (psint *, psreal *);
psreal * copy_packed_string_integer_digits_into_packed_string_real (psreal *, psint *, long long int);
psreal * copy_packed_string_integer_digits_into_packed_string_real_v2 (psreal *, psint *, long long int);
psnc * copy_packed_string_integer_digits_into_packed_string_real_component_left_of_decimal (psint *);
psnc * copy_packed_string_integer_digits_into_left_packed_string_real_component (psint *, unsigned long long int);
psreal * _packed_string_real_divide (psreal *, psreal *, psreal *, long long int);
psreal * _packed_string_real_add_both_numbers_same_sign (psreal *, psreal *, psreal *);
psreal * packed_string_real_add (psreal *, psreal *, psreal *);
psreal * _packed_string_real_subtract_both_numbers_same_sign (psreal *, psreal *, psreal *);
psreal * packed_string_real_subtract (psreal *difference, psreal *, psreal *);
psreal * packed_string_real_multiply (psreal *product, psreal *, psreal *);
psreal * packed_string_real_divide (psreal *, psreal *, psreal *, long long int);
unsigned char packed_string_real_equal (psreal *, psreal *);
unsigned char packed_string_real_not_equal (psreal *, psreal *);
unsigned char packed_string_real_less_than (psreal *, psreal *);
unsigned char packed_string_real_less_than_or_equal (psreal *, psreal *);
unsigned char packed_string_real_greater_than (psreal *, psreal *);
unsigned char packed_string_real_greater_than_or_equal (psreal *, psreal *);
psreal * packed_string_real_power (psreal *, psreal *, unsigned long long int);
psreal * packed_string_real_nth_root_with_bisection_method (psreal *, psreal *, unsigned long long int);
psreal * _packed_string_real_determine_seed_value_for_newton_raphson_nth_root (psreal *, psreal *, unsigned long long int);
psreal * packed_string_real_nth_root_with_newton_raphson_method (psreal *, psreal *, unsigned long long int);
psreal * convert_packed_string_real_to_scientific_notation (psreal *);
unsigned char is_packed_string_real_in_scientific_notation_format (psreal *);
psint * packed_string_real_truncate_to_packed_string_integer (psint *, psreal *);
unsigned char * convert_packed_string_real_to_boolean (psreal *);
psreal * convert_boolean_to_packed_string_real (unsigned char *);

