Re: consolidation multiplication
Posted: Tue Oct 11, 2011 8:19 pm
Thanks Steve.
It occurred to me last night that this doesn't handle negative numbers at the leaf level. To do this you would need to take the absolute value and keep track of how many minus signs there were. Something like this :-
['isnegative'] = N:IF(0>['data'],1,0);
['iszero'] = N:IF(0=['data'],1,0);
['logarithm'] = N:LN(ABS(['data']));
['data'] = C:IF(0=['iszero'], EXP(['logarithm']) * (-1)^['isnegative'], 0 );
It occurred to me last night that this doesn't handle negative numbers at the leaf level. To do this you would need to take the absolute value and keep track of how many minus signs there were. Something like this :-
['isnegative'] = N:IF(0>['data'],1,0);
['iszero'] = N:IF(0=['data'],1,0);
['logarithm'] = N:LN(ABS(['data']));
['data'] = C:IF(0=['iszero'], EXP(['logarithm']) * (-1)^['isnegative'], 0 );