![]() |
![]() |
#23 |
Dec 2019
Kansas
24 Posts |
![]()
I got mse of 8.27604×10^-6 (12 times better)
Last fiddled with by what on 2019-12-18 at 22:52 |
![]() |
![]() |
![]() |
#24 |
Jun 2016
23·3 Posts |
![]()
I think there was some discussion earlier about whether expressions would be allowed which used brackets in such a way that they have subexpressions that can't be evaluated in a single pass without storing intermediate results.
Could one of the people who has had a solution accepted please confirm whether an expression like (x - 1) * (x + 2) would be allowed for example? |
![]() |
![]() |
![]() |
#25 | |
Sep 2017
7×19 Posts |
![]() Quote:
x*x*x*x*x*x*x*x requires 7 operations, but you can do it using only 3 operations if you were allowed to save and substitute the results: y = x*x z = y*y z*z so z would be x*x*x*x and z*z would give the x*x*x*x*x*x*x*x In your case you can do it in 3 operations in any case, by finding the subexpressions and mutliply them or x*x+x-2 or (1+x)*x - 2 In computer language: keeping the intermediate results in registers is allowed, but you can't assign them to variables and reuse them later. |
|
![]() |
![]() |
![]() |
#26 |
Dec 2019
Kansas
1016 Posts |
![]()
I wonder how someone got an error of only 1.803E-7. The best I have managed is 2.9E-6, and I can't think of anything to decrease it.
Last fiddled with by what on 2019-12-25 at 02:04 |
![]() |
![]() |
![]() |
#27 | |
Oct 2017
2·32·7 Posts |
![]() Quote:
„Is it allowed to write for example y=x*x (one operation) and f =(a*y+b)*y+... (the other operations), or have all 15 operations to be in the same expression?“ The answer was: You can not define new variables. |
|
![]() |
![]() |
![]() |
#28 | |
Oct 2017
1768 Posts |
![]() Quote:
You will say: in ONE Register. Otherwise I could write: movsd xmm1,x mulsd xmm1,x (x*x in xmm1) movsd xmm0,a mulsd xmm0,xmm1 addsd xmm0,b (a*x*x+b in xmm0) mulsd xmm0,xmm1 addsd xmm0,c ((a*x*x+b)*x*x+c in xmm0) and so on. I think that this is not allowed. |
|
![]() |
![]() |
![]() |
#29 | |
Sep 2017
2058 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#30 |
Sep 2017
13310 Posts |
![]() |
![]() |
![]() |
![]() |
#31 |
Feb 2017
Nowhere
590410 Posts |
![]()
I note that they corrected the MSE for their example from .125 to 1/6.
I fault the statement of the problem, in that it did not specify the type(s) of constants that were acceptable. I guessed that decimal fractions were OK since the MSE bound and the original, incorrect MSE value for the example were stated as such. I note that they also changed the criteria for "bonus" asterisk(s). In the original statement of the problem, they referred to "elegant" solutions. In the current incarnation, they refer to smallest MSE to date. |
![]() |
![]() |
![]() |
#32 |
Dec 2019
Kansas
24 Posts |
![]() |
![]() |
![]() |
![]() |
#33 |
Dec 2019
Kansas
24 Posts |
![]()
I only managed to get the 1.803E-7 MSE after using 21 operations. I wonder what I'm missing
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
December 2018 | Xyzzy | Puzzles | 6 | 2019-01-06 23:07 |
December 2017 | Batalov | Puzzles | 4 | 2018-01-04 04:33 |
December 2016 | Xyzzy | Puzzles | 11 | 2017-01-24 12:27 |
December 2015 | Xyzzy | Puzzles | 15 | 2016-01-06 10:23 |
December 2014 | Xyzzy | Puzzles | 13 | 2015-01-02 19:41 |