-math:log10(1)

Saturday, 26 May 2018 · 3 messages · last reply 28 May 2018
GC
Giuseppe Celano26 May 2018 17:01 #
- math:log10(1) returns -0 but -0 returns 0: is there a reason for that? Thanks! Giuseppe Universität Leipzig Institute of Computer Science, NLP Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano at informatik.uni-leipzig.de E-mail: giuseppegacelano at gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/
LS
Leo Studer27 May 2018 18:58 #
Giuseppe this is the floating point representation IEEE 754 that allows -0 and 0 both being the same. Yours Leo
Quoted text · Giuseppe Celano · 7 lines
> On 26 May 2018, at 17:01, Giuseppe Celano <celano at informatik.uni-leipzig.de> wrote: > > - math:log10(1) returns -0 but -0 returns 0: is there a reason for that? > > Thanks! > Giuseppe >
CG
Christian Grünin reply to Giuseppe Celano, 26 May 2018, 17:0128 May 2018 07:12 #
Hi Giuseppe, The query -0 yields a minus expression with the integer 0 as argument. The result will be the integer 0. You can view the unoptimized query plan by sending the BaseX command "SET COMPPLAN false" (e.g. in the command input panel on top in the GUI) before running the query. As Leo indicated, math:log will return a floating point value, which can either be -0 or 0. Cheers, Christian Giuseppe Celano <celano at informatik.uni-leipzig.de> schrieb am Sa., 26. Mai 2018, 17:02:
Quoted text · Giuseppe Celano · 18 lines
> - math:log10(1) returns -0 but -0 returns 0: is there a reason for that? > > Thanks! > Giuseppe > > > Universität Leipzig > Institute of Computer Science, NLP > Augustusplatz 10 > 04109 Leipzig > Deutschland > E-mail: celano at informatik.uni-leipzig.de > <celano at informatik.uni-leipzig.de> > E-mail: giuseppegacelano at gmail.com > Web site 1: http://www.dh.uni-leipzig.de/wo/team/ > Web site 2: https://sites.google.com/site/giuseppegacelano/ > >

⚡Generated with XQuery