Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should poweR return 0 if the exponent is negative? #1401

Open
jmmarulang opened this issue Nov 18, 2024 · 1 comment
Open

Should poweR return 0 if the exponent is negative? #1401

jmmarulang opened this issue Nov 18, 2024 · 1 comment

Comments

@jmmarulang
Copy link

See the following definition

analysis/theories/exp.v

Lines 996 to 1001 in 97d0779

Definition poweR x r :=
match x with
| x'%:E => (x' `^ r)%:E
| +oo => if r == 0%R then 1%E else +oo
| -oo => if r == 0%R then 1%E else 0%E
end.

Note that for real numbers, the limit of the power function when the exponent is negative, goes to 0.

@hoheinzollern
Copy link
Collaborator

hoheinzollern commented Nov 18, 2024

So the proposed alternative definition could be:

 Definition poweR x r := 
   match x with 
   | x'%:E => (x' `^ r)%:E 
   | +oo => if r == 0%R then 1%E else if r > 0 then +oo else 0%E
   | -oo => 1%E
   end. 

(edited after discussion with @jmmarulang )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants