More tests#58
Conversation
|
Thanks a lot @Jaxan ! I'll look into this asap. For the time being, why did you have to change the bounds on |
|
Good question. The reason is that the function As I said, the code is a bit of a mess (and more for exposition instead of merging). I also changed stuff in |
|
Great points! Yes, working over Z or Q would enable exact algorithms, but then we'd have to rewrite all the parts that use square roots (such as the L2 norm), trig functions etc. |
|
I think it's the most we can easily get out of QuickCheck. For the floating point instances and classes like |
I just wanted to show how we could use more QuickCheck property testing.
These commits are still a bit of a mess as I wanted to use floating points first (that clearly will not work). And afterwards moved to rational numbers. I propose not to merge it, but just to have a look at it.
Note that
Complex Rationaldoes not have aNuminstance because one cannot defineabs. This is a bit annoying and really a problem withbase. Also we cannot haveNormedinstances for rational numbers, so we can only test some things exactly.