Apache OpenOffice (AOO) Bugzilla – Issue 110500
On error LOG should return #NUM! or #VALUE! and not Err:502
Last modified: 2013-08-01 05:36:32 UTC
Reproduce; 1) Add "=LOG(A2,10)" to C3 2) Add "abcdef" to A2 Result; on 1) oocalc displays "Err:502" on 2) oocalc displays "Err:502" Expected; on 1) oocalc should display "#NUM!" on 2) oocalc should display "#VALUE!" Why? Because that's what Excel does too and now KSpread too where we fixed it to behave like Excel.
Some more details. This is what we do with the argument according to what Excel does; if (args[0].isError()) return args [0]; if (args[0].isEmpty()) return Value::errorNUM(); if (args[0].isNumber() == false) return Value::errorVALUE(); if (args[0].asFloat() <= 0) return Value::errorNUM();
In OOO320_m14 Calc gives #VALUE! for C3
Step Calc Rev. 1507307 Excel 2007 1 Err:508 #NUM! 2 Err:508 #VALUE!