/***********************************************************************************
 * 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_FLOAT_FUNCTIONS
#define LIBCHAGA_PACKED_STRING_FLOAT_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



psflt * packed_string_float_release_memory (psflt *);
psflt * packed_string_float_component_release_memory (psflt *);
psflt * packed_string_float_set_sign (psflt *, enum string_number_sign);
psflt * packed_string_float_initialize_to_zero (psflt *);
psflt * packed_string_float_initialize_to_undefined (psflt *);
psnc * packed_string_float_append_one_digit_left_of_decimal (psnc *, unsigned char);
psnc * packed_string_float_append_two_digits_left_of_decimal (psnc *, unsigned char);
psnc * packed_string_float_append_one_digit_right_of_decimal (psnc *, unsigned char);
psnc * packed_string_float_append_two_digits_right_of_decimal (psnc *, unsigned char);
psnc * packed_string_float_append_number_block_right_of_decimal_in_stack_order (psnc *, unsigned char *, int, enum occupied_nibble);
psflt * packed_string_float_copy_number (psflt *, psflt *);
psflt * packed_string_float_set_value (psflt *, char *);
void packed_string_float_display (psflt *, int);
int packed_string_float_determine_absolute_value_larger_of_two_floats (psflt *, psflt *);
psint * copy_packed_string_float_digits_into_packed_string_integer (psint *, psflt *);
psflt * copy_packed_string_integer_digits_into_packed_string_float (psflt *, psint *, long long int);
psflt * copy_packed_string_integer_digits_into_packed_string_float_v2 (psflt *, psint *, long long int);
psnc * copy_packed_string_integer_digits_into_packed_string_float_component_left_of_decimal (psint *);
psnc * copy_packed_string_integer_digits_into_left_packed_string_float_component (psint *, unsigned long long int);
psflt * _packed_string_float_divide (psflt *, psflt *, psflt *, long long int);
psflt * _packed_string_float_add_both_numbers_same_sign (psflt *, psflt *, psflt *);
psflt * packed_string_float_add (psflt *, psflt *, psflt *);
psflt * _packed_string_float_subtract_both_numbers_same_sign (psflt *, psflt *, psflt *);
psflt * packed_string_float_subtract (psflt *difference, psflt *, psflt *);
psflt * packed_string_float_multiply (psflt *product, psflt *, psflt *);
psflt * packed_string_float_divide (psflt *, psflt *, psflt *, long long int);
unsigned char packed_string_float_equal (psflt *, psflt *);
unsigned char packed_string_float_not_equal (psflt *, psflt *);
unsigned char packed_string_float_less_than (psflt *, psflt *);
unsigned char packed_string_float_less_than_or_equal (psflt *, psflt *);
unsigned char packed_string_float_greater_than (psflt *, psflt *);
unsigned char packed_string_float_greater_than_or_equal (psflt *, psflt *);
psflt * packed_string_float_power (psflt *, psflt *, unsigned long long int);
psflt * packed_string_float_nth_root_with_bisection_method (psflt *, psflt *, unsigned long long int);
psflt * _packed_string_float_determine_seed_value_for_newton_raphson_nth_root (psflt *, psflt *, unsigned long long int);
psflt * packed_string_float_nth_root_with_newton_raphson_method (psflt *, psflt *, unsigned long long int);
psflt * convert_packed_string_float_to_scientific_notation (psflt *);
unsigned char is_packed_string_float_in_scientific_notation_format (psflt *);
psint * packed_string_float_truncate_to_packed_string_integer (psint *, psflt *);
unsigned char * convert_packed_string_float_to_boolean (psflt *);
psflt * convert_boolean_to_packed_string_float (unsigned char *);

