MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Possible bug in Floor function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132348] Re: Possible bug in Floor function?
  • From: Matthias Bode <lvsaba at hotmail.com>
  • Date: Sat, 15 Feb 2014 23:14:37 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20140215090214.8888569D4@smc.vnet.net>

Hola,

the "salient point":

In[1]:= Log[1000, 1000000]
Floor[Log[1000., x]] /. x -> 1000000
N[Floor[Log[1000., x]] /. x -> 1000000]
N[Floor[Log[1000, x]] /. x -> 1000000]
Floor[Log[1000, x]] /. x -> 1000000

Out[1]= 2

Out[2]= 2

Out[3]= 2.

During evaluation of In[1]:= Floor::meprec:Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating Floor[Log[1000000]/Log[1000]]. >>

Out[4]= 2

During evaluation of In[1]:= Floor::meprec:Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating Floor[Log[1000000]/Log[1000]]. >>

Out[5]= Floor[Log[1000000]/Log[1000]]

But not reliably so:

In[1]:= Log[100, 10000]
Floor[Log[100., x]] /. x -> 10000
N[Floor[Log[100., x]] /. x -> 10000]
N[Floor[Log[100, x]] /. x -> 10000]
Floor[Log[100, x]] /. x -> 10000

Out[1]= 2

Out[2]= 1

Out[3]= 1.

During evaluation of In[1]:= Floor::meprec:Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating Floor[Log[10000]/Log[100]]. >>

Out[4]= 1

During evaluation of In[1]:= Floor::meprec:Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating Floor[Log[10000]/Log[100]]. >>

Out[5]= Floor[Log[10000]/Log[100]]

In[7]:= $Version

Out[7]= "9.0 for Microsoft Windows (64-bit) (January 25, 2013)"

Best regards,

MATTHIAS BODE.
S 17.36398
W 66.218162'590 m. AMSL.
> From: s.nesseris at gmail.com
> Subject: Possible bug in Floor function?
> To: mathgroup at smc.vnet.net
> Date: Sat, 15 Feb 2014 04:02:14 -0500
>
> Hi,
>
> I think I may have stumbled upon a possible bug in Floor. Evaluating the following gives the correct result:
>
> Floor[Log[10, 100.]]
> 2
>
> Evaluating it with a replacement and //N gives a message and the wrong result:
>
> Floor[Log[10, x]] /. x -> 100 // N
>
> Floor::meprec: Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating Floor[Log[100]/Log[10]]. >>
>
> 1
>
> I'm on Math 9.0 + Win7, but Math 8 gives the same (wrong) result as well.
>
> Cheers
>


  • Prev by Date: Re: Possible bug in Floor function?
  • Next by Date: Re: Possible bug in Floor function?
  • Previous by thread: Re: Possible bug in Floor function?
  • Next by thread: Re: Possible bug in Floor function?