       An idea on-- Round[Log/Log]

• To: mathgroup at smc.vnet.net
• Subject: [mg14015] An idea on-- Round[Log/Log]
• From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
• Date: Wed, 16 Sep 1998 14:11:57 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Recall the recent discussion on Round[Log/Log]. The line below
produces a message, and no progress on the problem.

In:=
Round[Log/Log]

\$MaxEtraPrecision::meprec:
In increasing internal precision while attempting to evaluate
Round[Log/Log], the limit \$MaxExtraPrecision=49.99  was reached.
Increasing the value of \$MaxExtraPrecision may help resolve the
uncertainty.

Out=
Round[Log/Log]

As others pointed out, we need to use FullSimplify inside of Round to
get the desired result.  It would be nice if the kernel could figure
out when FullSimplify might help and use it, but only in cases where
the normal algorithm fails.  My definition below for Round does the
trick.

In:=
\$UseFullSimplify=True;
Unprotect[Round];
Round[expr_]/;\$UseFullSimplify:=
Block[{\$UseFullSimplify,\$Messages={}},
Check[
Round[expr],
Round[FullSimplify[expr]],
\$MaxExtraPrecision::meprec
]
];
Protect[Round];

In:=
Round[Log/Log]

Out=
0

We get the right answer, and FullSimplify is only used when it's needed!
The same improvement can be made for Floor, Ceiling and possibly
others.

Cheers,
Ted Ersek

```

• Prev by Date: Mathematica Art - Gallery Openning
• Next by Date: An idea on-- Round[Log/Log]
• Previous by thread: Mathematica Art - Gallery Openning
• Next by thread: An idea on-- Round[Log/Log]