Commit b9e8092
committed
Fix Student's T kernel formula sign error in tdist()
The tdist() function had a double-negative that caused strength to
increase with distance instead of decrease:
return max / pow(base, -(nu + 1.0) / 2.0); // wrong: dividing by negative exp
Fixed to:
return max * pow(base, -(nu + 1.0) / 2.0); // correct: multiply by negative exp
This bug caused the Student's T spatial kernel to produce physically
nonsensical results where interaction strength exceeded fmax at non-zero
distances.1 parent c5e3701 commit b9e8092
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments