44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
# Root-finding tests
|
|
|
|
# Square root tests
|
|
sqrt:0,0:0
|
|
sqrt:0,=1:0
|
|
sqrt:1,0:1
|
|
sqrt:1,=1:1
|
|
sqrt:1,5:1
|
|
sqrt:256,=1:16
|
|
sqrt:257,=1:16
|
|
sqrt:-1,0:$MP_UNDEF
|
|
sqrt:-1,=1:$MP_UNDEF
|
|
sqrt:-1029384298,66883:$MP_UNDEF
|
|
sqrt:394820398429038402938402,=1:628347354915
|
|
sqrt:394820398429038402938402,-5839823984:628347354915
|
|
sqrt:17179869183,0:131071
|
|
sqrt:4295098369,=1:65537
|
|
sqrt:26965706504352387672564992041751053514175649974280741932736827760729,=1:5192851481060515336695158019653723
|
|
|
|
# More general roots
|
|
root:0,1,0:0
|
|
root:0,1,=1:0
|
|
root:0,5,0:0
|
|
root:0,5,=1:0
|
|
root:-1,5,0:-1
|
|
root:-1,4,0:$MP_UNDEF
|
|
root:-1,3,=1:-1
|
|
root:-8,3,0:-2
|
|
root:-8,3,=1:-2
|
|
root:17,2,0:4
|
|
root:17,3,0:2
|
|
root:29,2,0:5
|
|
root:29,3,0:3
|
|
root:50,5,=1:2
|
|
root:4295098369,2,0:65537
|
|
root:4295098369,2,43:65537
|
|
root:4295098369,2,=1:65537
|
|
root:-4295098369,2,=1:$MP_UNDEF
|
|
root:-4295098369,4,65537:$MP_UNDEF
|
|
root:-281487861809153,3,0:-65537
|
|
root:-281487861809153,3,=1:-65537
|
|
root:-281487861809153,3,8349283:-65537
|
|
root:-19991036671350700657170189502736817905009200157042372341654483623953031910930270960998207372480741818129399253027601458115528449927512127290460743651463958852225556661727551760552841554362323271980596910944452290359774556447658518439936535499843549082781717193598437061923,7,=1:-571823748273487384719287348728374273472
|
|
root:26965706504352387672564992041751053514175649974280741932736827760729,2,=1:5192851481060515336695158019653723
|