(res, ex)
| 1541 | return DotExample(x, y, DotExact(x, y), Condition(x, y)) |
| 1542 | |
| 1543 | def RelativeError(res, ex): |
| 1544 | x, y, target_sumprod, condition = ex |
| 1545 | n = DotExact(list(x) + [-res], list(y) + [1]) |
| 1546 | return fabs(n / target_sumprod) |
| 1547 | |
| 1548 | def Trial(dotfunc, c, n): |
| 1549 | ex = GenDot(10, c) |