Re: Possible bug in Floor function?
- To: mathgroup at smc.vnet.net
- Subject: [mg132347] Re: Possible bug in Floor function?
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Sat, 15 Feb 2014 23:14:17 -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>
It is sometimes better to simplify expressions prior to using numerical techniques. $Version "9.0 for Mac OS X x86 (64-bit) (January 24, 2013)" Off[Floor::meprec] (* Supressing error messages. This does not change the results. *) Floor[Log[10, x]] /. x -> 100 // FullSimplify // N 2. Floor[Log[10, x] /. x -> 100 // FullSimplify] // N 2. Oddly, using PowerExpand results in an integer result despite the use of N Floor[Log[10, x]] /. x -> 100 // PowerExpand // N 2 Floor[Log[10, x] /. x -> 100 // PowerExpand] // N 2 Bob Hanlon On Sat, Feb 15, 2014 at 4:02 AM, psycho_dad <s.nesseris at gmail.com> wrote: > 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 > >
- References:
- Possible bug in Floor function?
- From: psycho_dad <s.nesseris@gmail.com>
- Possible bug in Floor function?