From 840d294a4a1e0c4286b162007f49a8233350a9c2 Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Fri, 20 Feb 2026 15:23:26 +0100 Subject: Change double to long double because numbers get too big for high derivatives. --- double.h | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'double.h') diff --git a/double.h b/double.h index 032d994..6678ba6 100644 --- a/double.h +++ b/double.h @@ -3,44 +3,47 @@ #include -double int_to_valuetype(int); +typedef long double vtype; +typedef long double etype; -double int_to_exptype(double); +vtype int_to_valuetype(int); -double infinity_to_exptype(); +etype int_to_exptype(int); -bool exptype_is_infinite(double); +vtype infinity_to_exptype(); -bool is_greater_certainly(double,double); +bool exptype_is_infinite(vtype); -bool is_greater_possibly(double,double); +bool is_greater_certainly(vtype,vtype); -double maximum(double,double); +bool is_greater_possibly(vtype,vtype); -double sum(double,double); +vtype maximum(vtype,vtype); -double difference(double,double); +vtype sum(vtype,vtype); -double product(double,double); +vtype difference(vtype,vtype); -double ratio(double,double); +vtype product(vtype,vtype); -double absolute(double); +vtype ratio(vtype,vtype); -double power(double,double); +vtype absolute(vtype); -double valuetype_to_double(double); +vtype power(vtype,vtype); -int exptype_to_string(char*,double); +double valuetype_to_double(vtype); -int exptype_to_latex(char*,double); +int exptype_to_string(char*,vtype); -int valuetype_to_string(char*,double); +int exptype_to_latex(char*,vtype); -int valuetype_to_latex(char*,double); +int valuetype_to_string(char*,vtype); -int root_to_string(char*,double,double); +int valuetype_to_latex(char*,vtype); -int root_to_latex(char*,double,double); +int root_to_string(char*,vtype,etype); + +int root_to_latex(char*,vtype,etype); #endif -- cgit v1.2.3