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

Error Literal mutation #87

Open
mabdi opened this issue Jul 9, 2020 · 1 comment
Open

Error Literal mutation #87

mabdi opened this issue Jul 9, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@mabdi
Copy link
Owner

mabdi commented Jul 9, 2020

Literal mutating ff parameters: #(1 2) has versions like ff parameters: #(1 SmallInteger maxVal) which is not acceptable.

@mabdi mabdi added the bug Something isn't working label Jul 9, 2020
@mabdi
Copy link
Owner Author

mabdi commented Jul 9, 2020

method:

testFunctionFit
	| ff ar p |
	ff := PMFunctionFit function: f data: d.
	ar := ff parameters.
	ar
		do: [ :i | 
			self assert: i isNumber.
			self assert: i ~= 0 ].
	ff parameters: #(1 2).
	self assert: ff parameters equals: #(1 2).
	p := PMWeightedPoint point: -2 @ 1.
	self shouldnt: [ ff accumulate: p ] raise: Error.	"function result will be NaN and should be ignored in the following calculations"
	ff parameters: ar.
	ff evaluate.
	self assert: (ff parameters equalsTo: #(2 0.4))

from PolyMath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant