(05-21-2015 01:18 PM)fhub Wrote: (05-21-2015 11:53 AM)Tugdual Wrote: I think there are 128 in my list and this is what Haskell returned.

Do you expect more?

Yes, I do expect more.

Your list is missing 8 additional solutions (due to rounding errors), there are 136 solutions in total - here the missing 8:

183745269

183745629

269851473

269851743

783145269

783145629

869251473

869251743

If you rewrite your equation (avoiding the 2 divisions by multiplying with the 2 denominators), then your program will give you all 136 solutions.

Edit: Or change the test to something like abs(expr-66)<1e-3 ...

Franz

Thanks! I'm getting used to the 50g CAS and tend to forget about wandering floats.

Code:

`[x | x <- permutations [1..9], abs(x!!0+13*x!!1/x!!2+x!!3+12*x!!4-x!!5-11+x!!6*x!!7/x!!8-10-66) < 1E-6]`

and do get the 136 answers (a bit slower by the way... but still pretty quick).