Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSat, 10 Oct 2020 11:25:16 +0200silly? - math - question about fractional powers of negative basehttps://ask.libreoffice.org/en/question/270446/silly-math-question-about-fractional-powers-of-negative-base/ hello @all,
there are some questions and bugs around about the evaluation of fractional powers (roots) from negative bases, e.g. -8^(1/3) is the third root from -8 and thus -2, while -8^(1/2) results in an imaginary number 'i * squareroot(8)' [math: i=squareroot(-1)], and is not representable in spreadsheets ...
a simple marginal question of these problems: fractions can be 'extended', so (-1)^(1/3) would / should be the same as (-1)^(2/6)?
but if you now evaluate this according to school maths (base powered to a fraction is 'denominator root' from 'base to power of numerator'):
you get once ((-1)^1)^(1/3) - or cube root of '-1' - so '-1',
and once ((-1)^2)^(1/6) - or 6th root of '-1 squared', thus 6th root of 1, thus 1,
that can't be true for both?
probably there are some rules or definition restrictions or additional solutions in 'math'? but i don't remember if we were told this in school, and i couldn't find instant answer on the web, i hope someone here knows about ...
or do I have a cardinal error in thinking somewhere?
(why am i asking this question here ... imho calc should try to produce mathematical correct results, and for that such questions are important)
tia fah,
b. newbie-02Sat, 10 Oct 2020 11:25:16 +0200https://ask.libreoffice.org/en/question/270446/Weighted Average. Runtime Error: Index out of defined Range.https://ask.libreoffice.org/en/question/207684/weighted-average-runtime-error-index-out-of-defined-range/Function Weighted_Average(optional x(), optional w())
dim WA as double
dim SUMWX as double
dim SUM as double
For i = 1 to UBound(x)
SUMWX = SUMWX + w(i,1)*x(i,1)
Next i
For b = 1 to UBound(x)
SUM = SUM + w(i,1)
Next b
WA = SUMWX/SUM
Weighted_Average = WA
End FunctionJackZedFri, 06 Sep 2019 18:07:08 +0200https://ask.libreoffice.org/en/question/207684/Changing all numbers above 1 to 1, otherwise unchangedhttps://ask.libreoffice.org/en/question/188131/changing-all-numbers-above-1-to-1-otherwise-unchanged/I have a time series of a lot of numbers, which range from zero to any number. I want to treat all numbers above one as if they are one, but leave the numbers below one unchanged.
For example 2.3456 would become 1.0, but 0.76345 would stay as 0.76345.
What is the simplest way of doing this please? Is there a function that can do it, rather than having to use conditional logic expressions?
I also want to do another separate series of calculations where all numbers below one become one, but numbers above one are unchanged.galaxianMon, 25 Mar 2019 12:31:54 +0100https://ask.libreoffice.org/en/question/188131/Re: Calc - COS(), can this be fixed?https://ask.libreoffice.org/en/question/126338/re-calc-cos-can-this-be-fixed/ It is readily apparent that the COS() function is inaccurate (check COS(PI()/2).
I do not know if this is a system call, or an internal math library. Either way it can be fairly unhelpful for precision calculations. Also, SIN() on larger angles is not accurately handled (check: SIN(PI()) should return 0, it does not).
A work-around is to instead:
1) if angle > pi/2 then reduce it to QI and deal with sign issues separately
2) if COS(angle) is desired, call SIN(PI()/2 - angle) instead
Can the trig function accuracy be improved? Or, failing that, is there any hope of incorporating this into the program itself so that the function error is more transparent to the end-user? Any factor of pi/2 should be correct regardless of other floating point errors. (Many other functions you may care to perform rely upon factors of PI/2 cancelling out variables in those locations).PiHunter_LMThu, 24 Aug 2017 09:38:10 +0200https://ask.libreoffice.org/en/question/126338/How do I successfully add nlpsolver to Calc?https://ask.libreoffice.org/en/question/106997/how-do-i-successfully-add-nlpsolver-to-calc/ Using ubuntu 32 bit. So far all attempts have shut dow libreoffice completely.SpillerSat, 01 Jul 2017 00:20:45 +0200https://ask.libreoffice.org/en/question/106997/calc - CALCulate mathematical formulaehttps://ask.libreoffice.org/en/question/83258/calc-calculate-mathematical-formulae/ Say I have three parameters:
m (in cell B2)
lambda (in cell B7)
mu (in cell B8)
where I can easily calculate
rho = lambda/(m*mu) (in cell B10)
I now want to calculate
``p0 = 1/(1 + (m * rho)^m/(m!*(1-rho)) + sum[n=1 to m-1]( (m*rho)^n / n!) ) ``
How do I enter the sum?
``(1/(1+(B2 * (B7/(B2*B8)))^B2/(FACT(B2) * (1-(B7/(B2*B8)))) + ???))``
note: I'm generating these formulae in bash so I don't need to use named cells and can re-use the generated formulae by copying the column and changing the parameters for your convenience:
lambda="B7"
mu="B8"
m="B2"
rho="($lambda/($m*$mu))"
echo -e "rho =\n\t$rho"
p0="(1/(1+($m * $rho)^$m/(FACT($m) * (1-$rho)) + ???))"
echo -e "p0 =\n\t$p0"
DiesNutsTue, 06 Dec 2016 12:06:57 +0100https://ask.libreoffice.org/en/question/83258/Does LibreOffice have comparable program to MS Excel's Data Analysis Toolpak? If so, how to install,use, etc. I'm taking a class and need done by Saturday.https://ask.libreoffice.org/en/question/51775/does-libreoffice-have-comparable-program-to-ms-excels-data-analysis-toolpak-if-so-how-to-installuse-etc-im-taking-a-class-and-need-done-by-saturday/ Teacher wants us to install to then utilize Data Analysis Toolpak in program. I'm taking an online course and homework is due by this Saturday. I'm a journo, statistics is not my bag. Hence the class. Help is appreciated.
=EDITING=
As in LibreOffice 'Math' ('Equation Editor') is the component concerned with pretty formulae, I changed the tags to better meet the content.
( @Lupp )faa3Thu, 11 Jun 2015 04:35:17 +0200https://ask.libreoffice.org/en/question/51775/