Repository navigation
Complex numbers functions - #580
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #580 +/- ##
===========================================
+ Coverage 92.38% 92.59% +0.21%
===========================================
Files 161 162 +1
Lines 36293 37282 +989
Branches 5261 5406 +145
===========================================
+ Hits 33528 34520 +992
+ Misses 2758 2755 -3
Partials 7 7
|
wojciechczerniak
left a comment
There was a problem hiding this comment.
Does that mean we have #281 implemented?
What will ISTEXT and ISNUMBER return for complex number?
What will happen if we add two references that have complex numbers?
What is the expected result for VALUE function?
| if(unit !== 'i' && unit !== 'j') { | ||
| return new CellError(ErrorType.VALUE, ErrorMessage.ShouldBeIorJ) | ||
| } | ||
| return coerceComplexToString([re, im], unit) |
There was a problem hiding this comment.
Should we coerceComplexToString at this level? If we have nested functions we will coerce to string and back from string. Maybe we should coerceComplexToString only when the value is requested by getCellValue?
There was a problem hiding this comment.
I know its tempting, but it will be hard to do do without some ugly hacking in the engine. When we return the value from function, we need to know whether it is going to be used as a string or complex value, which depends on the 'above' function.
Yes.
Yes, No.
Same thing that happens when adding two strings.
Error. |
bardek8
left a comment
There was a problem hiding this comment.
Perfect, no problems with consistency 💯
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Context
Added 26 math functions COMPLEX, IMABS, IMAGINARY, IMARGUMENT, IMCONJUGATE, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMDIV, IMEXP, IMLN, IMLOG10, IMLOG2, IMPOWER, IMPRODUCT, IMREAL, IMSEC, IMSECH, IMSIN, IMSINH, IMSQRT, IMSUB, IMSUM, IMTAN.
Also, solves #581
How has this been tested?
Types of changes
Related issue(s):
Checklist: