Short: shared DB float support lib Author: lorylombus@gmail.com (Lorence Lombardo) Uploader: lorylombus@gmail.com (Lorence Lombardo) Type: dev/lang Version: 9.0 Architecture: m68k-amigaos rc Tuesday 14-Dec-21 21:21:45 Standard disclaimer:- If you decide to use this library you do so at your own risk. "dbfsup.library" (c) 2020-2021 Lorence Lombardo. The dbfsup library is a shared double float support library and is especially useful to languages that do not have a formal IEEE DOUBLE float type. The following are function wrappers to the OS using 32bit addressing:- Dp_fix, Dp_flt, Dp_cmp, Dp_tst, Dp_abs, Dp_neg, Dp_add, Dp_sub, Dp_mul, Dp_div, Dp_floor, Dp_ceil, Dp_atan, Dp_sin, Dp_cos, Dp_tan, Dp_sincos, Dp_sinh, Dp_cosh, Dp_tanh, Dp_exp, Dp_log, Dp_pow, Dp_sqrt, Dp_tieee, Dp_fieee, Dp_asin, Dp_acos, Dp_log10 Double float results will be stored in the last function argument address. Single results will return. Apart from the stated changes the above functions will correspond to the RKM. eg. Dp_fix corresponds to IEEEDPFix in the RKM. These wrappers are a combined memory and math function. Additional support functions:- Check_math() Checks the status of your math libs. Val_dbl(buf,ad) Converts a numeric string to a double float. Intdbl(ad1,ad2) Double float to integer double float. Mod_dl(ad1,ad2) Returns the long mod of 2 double floats. Mb_strd_d(ad,base,fdig,dst) Double float to multi Base float string. Mb_strd(ad,base,dst) Double float to multi Base float string, with preset fraction digits for each base. Str_d(ad,dst) Double float to decimal string. Str_dr(ad,dst,fdig) Double float to decimal with rounding to the specified fraction digits. Hexstr_d(ad,dst) Double float to hexadecimal string. Binstr_d(ad,dst) Double float to binary string. Octstr_d(ad,dst) Double float to octal string. Val_long(buf) Converts a numeric string to a long integer. Ffp2dbl(ad1,ad2) Converts an FFP to a double float. Binstr(num,buf) Converts an integer to a 32bit binary string. Xt2dbl(ad1,ad2) Converts an extended float to a double float. Dbl2xt(ad1,ad2) Converts a double float to an extended float. Uns_long(num,ad) Converts a signed long to an unsigned double float. Flipmem(src,dst,sz) Flips memory from "src" to "dst" of a specified size. Dp_pi(ad) Places a Pi in a double float. Pow_dl(ad1,num,ad2) Double float to the power of long num to double float. Flt2dbl(ad1,ad2) Converts a single float to a double float. Dbl2ffp(ad) Converts a double float to an FFP. Dp_ufix(ad) Converts a double float up to the unsigned long maximum or the signed equivalent. Bin2dbl(buf,ln,ad) Converts a strictly no sign pure integer binary string of specified length to a double float. Bin2long(buf,ln) Converts a strictly no sign pure integer binary string of specified length to a long integer. All double float to string functions return the length. Currently example usage is provided for E, Blitz, C, ACE, HB2 and PB4. "dbftst" has been tested on "ROM 1.3". To store preset float values in a program with a language having no formal DOUBLE support "float2long" can be used to define your structure or array. eg. in CLI type the following:- float2long .33333333333333333333 1070945621 1431655757 So in your program the informal double would be defined as follows:- db1[0]=1070945621; db1[1]=1431655757; "float2long" can be obtained from here:- http://aminet.net/package/dev/lang/fl_utils web page:- http://geocities.ws/lorylomb/