Skip to content

Bugfix monotonicity pt#135

Merged
mgondan merged 1 commit intomgondan:mainfrom
jeremyirilli:main
Jan 26, 2026
Merged

Bugfix monotonicity pt#135
mgondan merged 1 commit intomgondan:mainfrom
jeremyirilli:main

Conversation

@jeremyirilli
Copy link
Copy Markdown
Contributor

pt is always increasing, so no need to find the maximum.

pt(seq(-3, 3, 0.3), 2)
 [1] 0.04773298 0.05707937 0.06922510 0.08527493 0.10683317 0.13619656
 [7] 0.17650168 0.23155251 0.30471663 0.39624283 0.50000000 0.60375717
[13] 0.69528337 0.76844749 0.82349832 0.86380344 0.89316683 0.91472507
[19] 0.93077490 0.94292063 0.95226702

Before

?- interval(pt(-0.5, 5...6), Res).
Res = 0.3191494358204645...0.31744.  %wrong

?- interval(pt(-0.5...0.2, 2...5, true), Res).
Res = 0.5...0.6808505641795355.

After

?- interval(pt(-0.5, 5...6), Res).
Res = 0.31744...0.3191494358204645.

interval(pt(-0.5...0.2, 2...5, true), Res).
Res = 0.3191494358204645...0.5753197430020855.
 pt(-0.5, 5)
[1] 0.3191494
pt(-0.5, 6)
[1] 0.31744


pt(-0.5, 2)
[1] 0.3333333
pt(-0.5, 5)
[1] 0.3191494
pt(0.2, 2)
[1] 0.570014
pt(0.2, 5)
[1] 0.5753197

@mgondan mgondan merged commit 0520475 into mgondan:main Jan 26, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants