1
$\begingroup$

For the following:

RegionBounds[ImplicitRegion[0 <= y <= Sqrt[1 - x^2], {x, y}]]

I get the correct value of {{-1, 1}, {0, 1}}.

However, this:

RegionBounds[ImplicitRegion[$MachineEpsilon <= y <= Sqrt[1 - x^2], {x, y}]]

produces {{-0.681805, 0.942851}, {0.0547502, 0.570898}}.

Any workarounds, or perhaps explanations?

Thanx.

$\endgroup$
7
  • 1
    $\begingroup$ Works with the exact value: RegionBounds[ImplicitRegion[2^-52 <= y <= Sqrt[1 - x^2], {x, y}]] $\endgroup$ – Michael E2 May 22 '20 at 14:49
  • $\begingroup$ Thanx! (I needed to wrap in `N[]`` to see that.) Any explanations? $\endgroup$ – Aharon Naiman May 22 '20 at 14:52
  • $\begingroup$ (Should I be reporting a bug?) $\endgroup$ – Aharon Naiman May 22 '20 at 14:52
  • 1
    $\begingroup$ Yeah, I think it's a bug. Oddly using SetPrecision[$MachineEpsilon, p] for p = 16, 17, 18,... gives seemingly random results. $\endgroup$ – Michael E2 May 22 '20 at 14:55
  • 2
    $\begingroup$ I'm putting in the bugs tag. Could someone with e.g. version 10 check this as well, and perhaps put in the usual bug header? $\endgroup$ – J. M.'s torpor May 22 '20 at 15:33
4
$\begingroup$

As a workaround, use exact numbers

Clear["Global`*"];

RegionBounds[ImplicitRegion[0 <= y <= Sqrt[1 - x^2], {x, y}]]

(* {{-1, 1}, {0, 1}} *)

RegionBounds[
  ImplicitRegion[
   SetPrecision[$MachineEpsilon, Infinity] <= y <= Sqrt[1 - x^2], {x, y}]] // 
 N

(* {{-1., 1.}, {2.22045*10^-16, 1.}} *)

or

RegionBounds[
  ImplicitRegion[
   Rationalize[$MachineEpsilon, 0] <= y <= Sqrt[1 - x^2], {x, y}]] // N

(* {{-1., 1.}, {2.22045*10^-16, 1.}} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.