Ask Your Question

pircks's profile - activity

2020-01-10 21:16:24 +0100 received badge  Popular Question (source)
2018-04-16 15:02:15 +0100 received badge  Nice Question (source)
2018-04-11 19:19:51 +0100 asked a question Non-linear regression with arbitrary precision arithmetic

I'm looking to do something like this:

R = RealField(1000)
data = [[R(1),R(5)],[R(5),sqrt(R(6))],[R(8),R(9)]]
var('a, b, c, x')
model(x) = a*x*x + b*x + c
find_fit(data, model)

However when I run this a,b and c seem to have been truncated to a double. How would I get arbitrary precision out of find_fit?

2015-12-31 18:01:07 +0100 received badge  Supporter (source)
2015-12-31 01:58:16 +0100 asked a question Expanding cos(a*(x+y))

I'm having trouble finding out how to expand


when wrapped by cos(). The expression


expands as expected, but


, leaves the expression unchanged. I would prefer a solution that scales for more complex expressions

2015-12-28 10:02:50 +0100 received badge  Student (source)
2015-12-28 08:59:08 +0100 asked a question Converting expression to list of terms and back

Given an expression how would I convert it to a list, and how would I convert a list to an expression?

For example:

x * b * cos(x^3) * sin(b)+b * cos(x)+h * sin(x)

Would convert to:

[x * b * cos(x^3) * sin(b),b * cos(x),h * sin(x)]

2015-12-28 08:59:08 +0100 commented question Trouble building sage from source inside a docker container

You mentioned that the above doesn't work. Is there a specific error?