Re: [libreoffice-users] VAR, STDEV, CHISQ.INV
Thank you for all your help! My best, Rui Cumprimentos, Rui Pedro Caldeira On Thu, Jul 9, 2015 at 11:15 AM, Rob Jasper wrote: > Joel, > > just read the MS-Excel explanation you are referring to. Great explanation. > Thanks for pointing to this. > > Rob. > > On 8 jul. 2015, at 20:42, Joel Madero wrote: > > > Sounds to me like normal floating number behavior. I know someone is > trying > > to document this and explain why it happens (it's a technical reason that > > goes beyond my skills) but this seems entirely normal behavior given the > > constraints of programming languages generally and hardware in > particular. > > > > > > Best, > > Joel > > > > P.S. You can see similar issues in other spreadsheet software. This seems > > to give some indication as to the reasons why: > > https://support.microsoft.com/en-us/kb/78113 (yes I know it's MSO > > link...just explaining the reason why floating number isn't entirely > > accurate all the time) > > > > On Wed, Jul 8, 2015 at 11:33 AM, Rui Pedro Caldeira < > rpcalde...@outlook.com> > > wrote: > > > >> Hey and thanks for your fast answer. This is the data set: > >> > >> 0.01 0.01 0.01 0.01 0.01 0.01 0.01 > >> 0.01 0.01 0.01 0.01 0.01 0.01 0.01 > >> 0.02 0.03 0.97 0.97 0.97 0.97 0.98 > >> 1.01 1.97 > >> > >> Using the formula in the spreadsheet it gives the value: 0.328061419 > (VAR) > >> and 0.5727664611 (STDEV) > >> > >> > >> And yes, i do mean CHISQ.INV :) > >> > >> Thanks, Rui. > >> > >> Cumprimentos, > >> Rui Pedro Caldeira > >> > >> On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker > > >> wrote: > >> > >>> At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote: > >>> > I'm having some problems with the VAR and STDEV function, when > executing > these lines of code. The average is well calculated but the remaining > >> two > return very low, unrealistic and equal values (6.93018471335974E-310). > > >>> > >>> That value is 2^-1027 - which is probably the smallest floating-point > >>> value your system can represent without underflow. > >>> > >>> Have you compared the results produced from your data by equivalent > >> normal > >>> formulae in a spreadsheet cell? > >>> > >>> Do you mean CHISQ.INV and not CHISQINV? > >>> > >>> Brian Barker > >>> > >>> -- > >>> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > >>> Problems? > >>> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > >>> Posting guidelines + more: > http://wiki.documentfoundation.org/Netiquette > >>> List archive: http://listarchives.libreoffice.org/global/users/ > >>> All messages sent to this list will be publicly archived and cannot be > >>> deleted > >>> > >>> > >> > >> -- > >> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > >> Problems? > >> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > >> Posting guidelines + more: > http://wiki.documentfoundation.org/Netiquette > >> List archive: http://listarchives.libreoffice.org/global/users/ > >> All messages sent to this list will be publicly archived and cannot be > >> deleted > >> > > > > > > > > -- > > *Joel Madero* > > LibreOffice QA Volunteer > > jmadero@gmail.com > > > > -- > > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > > Problems? > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > > List archive: http://listarchives.libreoffice.org/global/users/ > > All messages sent to this list will be publicly archived and cannot be > deleted > > -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] VAR, STDEV, CHISQ.INV
Joel, just read the MS-Excel explanation you are referring to. Great explanation. Thanks for pointing to this. Rob. On 8 jul. 2015, at 20:42, Joel Madero wrote: > Sounds to me like normal floating number behavior. I know someone is trying > to document this and explain why it happens (it's a technical reason that > goes beyond my skills) but this seems entirely normal behavior given the > constraints of programming languages generally and hardware in particular. > > > Best, > Joel > > P.S. You can see similar issues in other spreadsheet software. This seems > to give some indication as to the reasons why: > https://support.microsoft.com/en-us/kb/78113 (yes I know it's MSO > link...just explaining the reason why floating number isn't entirely > accurate all the time) > > On Wed, Jul 8, 2015 at 11:33 AM, Rui Pedro Caldeira > wrote: > >> Hey and thanks for your fast answer. This is the data set: >> >> 0.01 0.01 0.01 0.01 0.01 0.01 0.01 >> 0.01 0.01 0.01 0.01 0.01 0.01 0.01 >> 0.02 0.03 0.97 0.97 0.97 0.97 0.98 >> 1.01 1.97 >> >> Using the formula in the spreadsheet it gives the value: 0.328061419 (VAR) >> and 0.5727664611 (STDEV) >> >> >> And yes, i do mean CHISQ.INV :) >> >> Thanks, Rui. >> >> Cumprimentos, >> Rui Pedro Caldeira >> >> On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker >> wrote: >> >>> At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote: >>> I'm having some problems with the VAR and STDEV function, when executing these lines of code. The average is well calculated but the remaining >> two return very low, unrealistic and equal values (6.93018471335974E-310). >>> >>> That value is 2^-1027 - which is probably the smallest floating-point >>> value your system can represent without underflow. >>> >>> Have you compared the results produced from your data by equivalent >> normal >>> formulae in a spreadsheet cell? >>> >>> Do you mean CHISQ.INV and not CHISQINV? >>> >>> Brian Barker >>> >>> -- >>> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org >>> Problems? >>> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ >>> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette >>> List archive: http://listarchives.libreoffice.org/global/users/ >>> All messages sent to this list will be publicly archived and cannot be >>> deleted >>> >>> >> >> -- >> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org >> Problems? >> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ >> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette >> List archive: http://listarchives.libreoffice.org/global/users/ >> All messages sent to this list will be publicly archived and cannot be >> deleted >> > > > > -- > *Joel Madero* > LibreOffice QA Volunteer > jmadero@gmail.com > > -- > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > Problems? > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > List archive: http://listarchives.libreoffice.org/global/users/ > All messages sent to this list will be publicly archived and cannot be deleted -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] VAR, STDEV, CHISQ.INV
Guess what 1f*5/5==1f (Java; 1 AS float multiplied by 5 divided by 5 is equals to 1 as a float) Everyone not studying computer science won't understand this at first glance (and Google has the best explanations) but with Math.abs((1f/5*5)-1)<0.0001 you do not have a workaround, but the way it has to be done (Die not read the thread, just want to explain that you cannot = on floats) Am 08. Juli 2015 20:42:46 MESZ, schrieb Joel Madero : >Sounds to me like normal floating number behavior. I know someone is >trying >to document this and explain why it happens (it's a technical reason >that >goes beyond my skills) but this seems entirely normal behavior given >the >constraints of programming languages generally and hardware in >particular. > > >Best, >Joel > >P.S. You can see similar issues in other spreadsheet software. This >seems >to give some indication as to the reasons why: >https://support.microsoft.com/en-us/kb/78113 (yes I know it's MSO >link...just explaining the reason why floating number isn't entirely >accurate all the time) > >On Wed, Jul 8, 2015 at 11:33 AM, Rui Pedro Caldeira > >wrote: > >> Hey and thanks for your fast answer. This is the data set: >> >> 0.01 0.01 0.01 0.01 0.01 0.01 >0.01 >> 0.01 0.01 0.01 0.01 0.01 0.01 0.01 >> 0.02 0.03 0.97 0.97 0.97 0.97 0.98 >> 1.01 1.97 >> >> Using the formula in the spreadsheet it gives the value: 0.328061419 >(VAR) >> and 0.5727664611 (STDEV) >> >> >> And yes, i do mean CHISQ.INV :) >> >> Thanks, Rui. >> >> Cumprimentos, >> Rui Pedro Caldeira >> >> On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker > >> wrote: >> >> > At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote: >> > >> >> I'm having some problems with the VAR and STDEV function, when >executing >> >> these lines of code. The average is well calculated but the >remaining >> two >> >> return very low, unrealistic and equal values >(6.93018471335974E-310). >> >> >> > >> > That value is 2^-1027 - which is probably the smallest >floating-point >> > value your system can represent without underflow. >> > >> > Have you compared the results produced from your data by equivalent >> normal >> > formulae in a spreadsheet cell? >> > >> > Do you mean CHISQ.INV and not CHISQINV? >> > >> > Brian Barker >> > >> > -- >> > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org >> > Problems? >> > >http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ >> > Posting guidelines + more: >http://wiki.documentfoundation.org/Netiquette >> > List archive: http://listarchives.libreoffice.org/global/users/ >> > All messages sent to this list will be publicly archived and cannot >be >> > deleted >> > >> > >> >> -- >> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org >> Problems? >> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ >> Posting guidelines + more: >http://wiki.documentfoundation.org/Netiquette >> List archive: http://listarchives.libreoffice.org/global/users/ >> All messages sent to this list will be publicly archived and cannot >be >> deleted >> > > > >-- >*Joel Madero* >LibreOffice QA Volunteer >jmadero@gmail.com > >-- >To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org >Problems? >http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ >Posting guidelines + more: >http://wiki.documentfoundation.org/Netiquette >List archive: http://listarchives.libreoffice.org/global/users/ >All messages sent to this list will be publicly archived and cannot be >deleted -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] VAR, STDEV, CHISQ.INV
Sounds to me like normal floating number behavior. I know someone is trying to document this and explain why it happens (it's a technical reason that goes beyond my skills) but this seems entirely normal behavior given the constraints of programming languages generally and hardware in particular. Best, Joel P.S. You can see similar issues in other spreadsheet software. This seems to give some indication as to the reasons why: https://support.microsoft.com/en-us/kb/78113 (yes I know it's MSO link...just explaining the reason why floating number isn't entirely accurate all the time) On Wed, Jul 8, 2015 at 11:33 AM, Rui Pedro Caldeira wrote: > Hey and thanks for your fast answer. This is the data set: > > 0.01 0.01 0.01 0.01 0.01 0.01 0.01 > 0.01 0.01 0.01 0.01 0.01 0.01 0.01 > 0.02 0.03 0.97 0.97 0.97 0.97 0.98 > 1.01 1.97 > > Using the formula in the spreadsheet it gives the value: 0.328061419 (VAR) > and 0.5727664611 (STDEV) > > > And yes, i do mean CHISQ.INV :) > > Thanks, Rui. > > Cumprimentos, > Rui Pedro Caldeira > > On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker > wrote: > > > At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote: > > > >> I'm having some problems with the VAR and STDEV function, when executing > >> these lines of code. The average is well calculated but the remaining > two > >> return very low, unrealistic and equal values (6.93018471335974E-310). > >> > > > > That value is 2^-1027 - which is probably the smallest floating-point > > value your system can represent without underflow. > > > > Have you compared the results produced from your data by equivalent > normal > > formulae in a spreadsheet cell? > > > > Do you mean CHISQ.INV and not CHISQINV? > > > > Brian Barker > > > > -- > > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > > Problems? > > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > > List archive: http://listarchives.libreoffice.org/global/users/ > > All messages sent to this list will be publicly archived and cannot be > > deleted > > > > > > -- > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > Problems? > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > List archive: http://listarchives.libreoffice.org/global/users/ > All messages sent to this list will be publicly archived and cannot be > deleted > -- *Joel Madero* LibreOffice QA Volunteer jmadero@gmail.com -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] VAR, STDEV, CHISQ.INV
Hey and thanks for your fast answer. This is the data set: 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.02 0.03 0.97 0.97 0.97 0.97 0.98 1.01 1.97 Using the formula in the spreadsheet it gives the value: 0.328061419 (VAR) and 0.5727664611 (STDEV) And yes, i do mean CHISQ.INV :) Thanks, Rui. Cumprimentos, Rui Pedro Caldeira On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker wrote: > At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote: > >> I'm having some problems with the VAR and STDEV function, when executing >> these lines of code. The average is well calculated but the remaining two >> return very low, unrealistic and equal values (6.93018471335974E-310). >> > > That value is 2^-1027 - which is probably the smallest floating-point > value your system can represent without underflow. > > Have you compared the results produced from your data by equivalent normal > formulae in a spreadsheet cell? > > Do you mean CHISQ.INV and not CHISQINV? > > Brian Barker > > -- > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > Problems? > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > List archive: http://listarchives.libreoffice.org/global/users/ > All messages sent to this list will be publicly archived and cannot be > deleted > > -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] VAR, STDEV, CHISQ.INV
At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote: I'm having some problems with the VAR and STDEV function, when executing these lines of code. The average is well calculated but the remaining two return very low, unrealistic and equal values (6.93018471335974E-310). That value is 2^-1027 - which is probably the smallest floating-point value your system can represent without underflow. Have you compared the results produced from your data by equivalent normal formulae in a spreadsheet cell? Do you mean CHISQ.INV and not CHISQINV? Brian Barker -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] VAR, STDEV, CHISQ.INV
Hello guys, I’m having some problems with the VAR and STDEV function, when executing these lines of code. The average is well calculated but the remaining two return very low, unrealistic and equal values (6.93018471335974E-310). To add to a bad situation, I can’t execute the function CHISQINV as stated in the second code box below. It gives out the error: BASIC runtime error. An exception occurred Type: com.sun.star.lang.IllegalArgumentException Message: . Any help is deeply appreciated! Thanks, Rui == CODE BLOCK 1 ==oRange = xSheet.getCellRangeByPosition(7, 1, 7, rangeLim)'Media (funciona) average = oRange.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE) print average'Variancia (ver) variance = oRange.computeFunction(com.sun.star.sheet.GeneralFunction.VAR) print variance'StdDev (ver) stdDev = oRange.computeFunction(com.sun.star.sheet.GeneralFunction.STDEV) print stdDev == CODE BLOCK 2 == function CHISQINV (erro, degree)dim oFunction as variant oFunction = createUnoService("com.sun.star.sheet.FunctionAccess") dim aArgument(1 to 2) as variant dim result as doubleaArgument(1)=erro aArgument(2)=degree result = oFunction.callFunction("CHISQ.INV", aArgument())CHISQINV = resultend function -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted