Mirko Scholz
|
4316f928f8
|
added facility to debug the stack pointer on P3_4 (LCD LED cathode)
roughly 139 bytes
functions were chosen by manually traversing pow_decn to the bottom
|
2020-09-08 23:46:41 +02:00 |
|
Mirko Scholz
|
7593260487
|
freed some space for the stack
|
2020-09-08 16:57:25 +02:00 |
|
Mirko Scholz
|
51c2d2e2e7
|
handle truncation in entering numbers properly
|
2020-09-05 10:55:33 +02:00 |
|
Mirko Scholz
|
6ab4cfb714
|
extra checks for multiply
|
2020-09-05 10:35:45 +02:00 |
|
Mirko Scholz
|
6487fbde6e
|
move constants out of the header
(as far as my C knowledge goes, this may cause problems with the linker)
|
2020-09-05 10:25:35 +02:00 |
|
Mirko Scholz
|
c18c0dabfd
|
handle special cases for power function
|
2020-09-05 01:08:09 +02:00 |
|
Mirko Scholz
|
5ea2818fe3
|
move pow_decn from header to source file
|
2020-09-05 00:18:47 +02:00 |
|
Mirko Scholz
|
eea645f401
|
compiles again under sdcc-3.5.0
|
2020-09-04 20:45:29 +02:00 |
|
Jeff Wang
|
b04a95e420
|
increase test coverage
|
2019-11-20 01:54:04 -05:00 |
|
Jeff Wang
|
d532f2cf44
|
put license notice in all files, use GPLv3+
|
2019-11-14 03:45:52 -05:00 |
|
Jeff Wang
|
f70510e46a
|
use cmake everywhere for desktop build, fix build warnings
|
2019-11-14 02:44:07 -05:00 |
|
Jeff Wang
|
f25a71b74c
|
v1.09: bugfix for taking log/ln of a number with an exponent of 99
|
2019-11-14 02:15:34 -05:00 |
|
Jeff Wang
|
56e3034f9d
|
bugfix for exponents > 127 getting printed as negative
|
2019-10-22 02:13:29 -04:00 |
|
Jeff Wang
|
c3aa80289f
|
fix square root of 0 bug
|
2019-10-22 01:07:28 -04:00 |
|
Jeff Wang
|
581a8e26f1
|
disallow subtraction/negation of error
|
2019-10-21 02:36:57 -04:00 |
|
Jeff Wang
|
8f0598d75c
|
move tmp4 to xdata to free up more stack space
|
2019-10-07 00:08:25 -04:00 |
|
Jeff Wang
|
a3b00dd815
|
fix division: make recip operate on accum
also avoids extra copy when only taking recip
|
2019-10-07 00:08:08 -04:00 |
|
Jeff Wang
|
45e4dd25f8
|
fix e^x calculation for negative x
|
2019-10-06 21:38:32 -04:00 |
|
Jeff Wang
|
5f0cec0bad
|
bugfix for log()/pow: minimize stack usage
|
2019-10-06 21:04:45 -04:00 |
|
Jeff Wang
|
75dd499630
|
add power function, try to reduce stack usage, standardize unary ops
|
2019-10-06 21:04:45 -04:00 |
|
Jeff Wang
|
1a9bbcc1ce
|
initial exp() implementation
(refout for log(1.5) changed due to using more accurate expected result)
|
2019-10-06 21:04:40 -04:00 |
|
Jeff Wang
|
277ae0acf3
|
speedup log calculation by optimizing mulitplication by 1 + 10^-j
|
2019-10-05 01:04:57 -04:00 |
|
Jeff Wang
|
06ca0b2829
|
speedup log calculation by optimizing subtracting 10, regenerate reference output
|
2019-10-05 01:04:38 -04:00 |
|
Jeff Wang
|
ce42e30513
|
log10() fixes to prevent calculator from crashing
|
2019-10-04 23:49:42 -04:00 |
|
Jeff Wang
|
181469dd57
|
set error when trying to calculate log(0)
|
2019-10-03 00:32:38 -04:00 |
|
Jeff Wang
|
21be4081b2
|
add log10() function
|
2019-10-03 00:31:25 -04:00 |
|
Jeff Wang
|
5c194c68e4
|
build fix
|
2019-10-02 23:27:58 -04:00 |
|
Jeff Wang
|
77d18b57c5
|
make sure number not negative before trying to take log
also remove some TODOs
|
2019-10-02 22:51:02 -04:00 |
|
Jeff Wang
|
ac1aaac096
|
initial natural log implementation
|
2019-10-02 22:43:23 -04:00 |
|
Jeff Wang
|
6eb48de844
|
more comments
|
2019-09-24 00:11:51 -04:00 |
|
Jeff Wang
|
4f020da222
|
use global registers for division, have sub_mag() operate directly on Accum and B
|
2019-09-23 23:46:58 -04:00 |
|
Jeff Wang
|
747355222d
|
try to remove more trailing 0s
|
2019-09-23 23:06:43 -04:00 |
|
Jeff Wang
|
eccd89807a
|
improve initial estimate for division newton raphson iteration
|
2019-09-23 22:48:06 -04:00 |
|
Jeff Wang
|
52ddf7dd96
|
do not require BDecn to be preserved (frees up some xdata and code space)
|
2019-05-02 03:49:21 -04:00 |
|
Jeff Wang
|
0049f3df98
|
do not compile with stack auto, change functions to be nonreentrant, use fixed parameters
- frees up ~4KB of code space
|
2019-05-02 03:27:01 -04:00 |
|
Jeff Wang
|
6399cbf44f
|
modify code to use accumulator architecture to minimize pointer usage
|
2019-05-01 03:54:57 -04:00 |
|
Jeff Wang
|
96c762aeed
|
missed change for making number of exponent bits settable
|
2019-05-01 01:49:16 -04:00 |
|
Jeff Wang
|
60ed369c47
|
compare exponent directly for determining NaN
|
2019-05-01 01:40:23 -04:00 |
|
Jeff Wang
|
58a162fe4d
|
allow number of exponent bits to be adjustable
|
2019-05-01 01:37:14 -04:00 |
|
Jeff Wang
|
4b87ad27c8
|
speed up division
|
2019-05-01 01:11:25 -04:00 |
|
Jeff Wang
|
fcf16153f6
|
change exponent from int16_t to int8_t to free up some space
|
2019-04-05 02:39:09 -04:00 |
|
Jeff Wang
|
20946c44d4
|
detect division by 0
|
2019-04-05 01:07:42 -04:00 |
|
Jeff Wang
|
ef298cddd0
|
fix crash when displaying numbers between [0.1, 1)
|
2019-04-05 00:52:56 -04:00 |
|
Jeff Wang
|
8af9701e15
|
bugfix for entering numbers such as 0.33
this is a partial revert of commit 8550049335
|
2019-04-04 03:36:35 -04:00 |
|
Jeff Wang
|
8550049335
|
fix bug for entering numbers such as 0.01
|
2019-04-04 02:29:11 -04:00 |
|
Jeff Wang
|
1be980d85b
|
fix reciprocol convergence
|
2019-04-02 23:57:28 -04:00 |
|
Jeff Wang
|
8aec2ae134
|
fix exponent display
|
2019-04-01 01:12:02 -04:00 |
|
Jeff Wang
|
4ed3d1654e
|
various bugfixes for decn arithmetic
|
2019-03-31 19:37:55 -04:00 |
|
Jeff Wang
|
43edb291cf
|
attempt to reduce space usage
- remove unecessary code
- ifdef "extra" code
- pass data through globals instead of functions accessing static data
- functions non-reentrant, locate tmps in xdata
|
2019-03-31 19:37:52 -04:00 |
|
Jeff Wang
|
bdecc32b86
|
use global Buf everywhere for debugging
|
2019-03-28 00:41:54 -04:00 |
|