POWER() or caret ^ doesn't work with power value with inline fractions

Hi Team,

Following returns an incorrect value.
=(0.01)^(1/365)

Here with I have added an excel for your reference (Try A5, A6 and A7. A5 has the above formula).

Calculated Values
A1=0.00273972602739726       =>     =1/365
A2=0.00273972602739726       =>     Same, manually inserted

A5=0.987462354835435           =>     =(0.01)^(1/365)     => Incorrect
A6=0.993711404199144           =>     =(0.01)^(A1)         => Correct
A7=0.993711404199144           =>     =(0.01)^(A2)         => Correct

I suspect that this is happening due to the (1/365) part because in a general programming model, this returns an integer since both are integers.
Tried replace that with a variable (excel reference) and then it works (A6).

POWER() also behaves the same.

Thanks!

Attachment: TestPowerWithFrac_a8307618.zip

4 Replies

DB Dilli Babu Nandha Gopal Syncfusion Team July 23, 2018 09:20 AM UTC

Hi Suranga, 
 
Thank you for contacting Syncfusion support. 
 
We have checked the calculated values for the specified cells in the given input document. The cell “A5” contains the formula “=(0.01)^(1/365)” whereas the cells “A6” and “A7” contains the formula “=(0.1)^(A1)” and “=(0.1)^(A2)” respectively which will give different calculated values same as MS-Excel. But you have mentioned that the cells “A6” and “A7” contains formulas =”(0.01)^(A1) and “=(0.01)^(A2)”. We suspect that you have misplaced the base value with (0.01) instead of (0.1) in cell “A5”. Please refer the screenshot given below. 
 
 
 
Please let us know if you have any questions. 
 
Regards, 
Dilli babu 



SR Suranga R July 23, 2018 11:56 AM UTC

Hi Dilli,

Sorry, that was a big mistake.

But I can reproduce it somehow.

MS Excel
A1 => 7%
B1 => =(1+A1)^(1/365)-1

Excel shows in B1 => 0.000185383341570589000000000000

XlsIO
worksheet["B1"].CalculatedValue = 0.000185383341569922

Please check the attached sample.

Thank you!



Attachment: Sample_4f58ed6e.zip


MC Mohan Chandran Syncfusion Team July 25, 2018 12:54 PM UTC

Hi Suranga, 

We are able to reproduce the issue and we have logged a defect report for this issue. The fix for this issue will be included in our future release 2018 Volume 2 Service Pack 2 which will be rolled out at the end of August 2018. 
 
Regards, 
Mohan. 



SR Suranga R July 26, 2018 03:33 AM UTC

Cheers...!

Loader.
Up arrow icon