Skip to content

Fix the scale of the small-input exponential result - #433

Open
jakezwang wants to merge 1 commit into
shopspring:masterfrom
jakezwang:fix/exponential-small-input-scale
Open

jakezwang wants to merge 1 commit into
shopspring:masterfrom
jakezwang:fix/exponential-small-input-scale

Conversation

@jakezwang

Copy link
Copy Markdown

The small-argument shortcut in ExpHullAbrham intends to return 1, but retains the input exponent. For example, NewFromString("0.000001") followed by ExpHullAbrham(4) returns 0.000001; adding trailing zeros to the input changes the result again.

Return coefficient 1 with exponent 0. Add table cases for both signs, equivalent input scales, the positive shortcut boundary and different precision, with ordinary inputs as controls.

Validation: full tests pass on Go 1.10.8 (Linux/ARM64) and Go 1.22–1.27, including race detection on Go 1.26.6; go vet and go build pass.

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.

1 participant