Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Float tests #492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions check/examples.frm
Original file line number Diff line number Diff line change
Expand Up @@ -1941,4 +1941,79 @@ Print;
* assert succeeded?
* assert nterms("F") == 4999
*--#] Diagrams_6 :
*--#[ Float_1 :
#-
* Example from the FORM Workshop (Madrid 2023) slides

#StartFloat 500,15

Local F1 =
-mzv_(8,1,1,5)
+29056868/39414375*mzv_(2)^6*mzv_(3)
-47576/40425*mzv_(2)^5*mzv_(5)
-163291/18375*mzv_(2)^4*mzv_(7)
-4/105*mzv_(2)^3*mzv_(3)^3
-450797/11025*mzv_(2)^3*mzv_(9)
+7/5*mzv_(2)^2*mzv_(3)^2*mzv_(5)
+16/25*mzv_(2)^2*mzv_(3)*mzv_(5,3)
+454049/1400*mzv_(2)^2*mzv_(11)
-16/25*mzv_(2)^2*mzv_(5,3,3)
+3*mzv_(2)*mzv_(3)^2*mzv_(7)
+61/14*mzv_(2)*mzv_(3)*mzv_(5)^2
+2/7*mzv_(2)*mzv_(3)*mzv_(7,3)
+2172853/420*mzv_(2)*mzv_(13)
-2/7*mzv_(2)*mzv_(7,3,3)
+1/7*mzv_(2)*mzv_(5,5,3)
-33/4*mzv_(3)^2*mzv_(9)
-133/6*mzv_(3)*mzv_(5)*mzv_(7)
-25/9*mzv_(3)*mzv_(9,3)
-244/105*mzv_(5)^3
-359/105*mzv_(5)*mzv_(7,3)
+3/10*mzv_(7)*mzv_(5,3)
+89/18*mzv_(9,3,3)
+569/105*mzv_(7,3,5);
L F2 = mzv_(15);
Evaluate mzv_;
Print;
.sort

Skip F1,F2;
Local X = F1/F2;
ToRational;
Print;
.sort

#EndFloat
Local G1 = F1;
Local G2 = F2;

Print G1,G2;
.end
assert succeeded?
assert result("X") =~ expr("229903169/25200")
assert stdout =~ exact_pattern(<<'EOF')
F1 =
9.1234206877960755900164875575406726239325002222490534540605137258846994\
916348297032751308227224952419629422497720599224543719959652966613231560\
6913925597e+0;
EOF
assert stdout =~ exact_pattern(<<'EOF')
F2 =
1.0000305882363070204935517285106450625876279487068581775065699328933322\
671563422795730723343470175484943669684442492832530297757588781904321794\
4047700034253;
EOF
assert stdout =~ exact_pattern(<<'EOF')
G1 =
float_(9,9,1,12232507224603456570941665221340125041397786269129604087876\
792424004667562978035312462415295319766403611636425161522971836411112965\
9196489428266949058466393830);
EOF
assert stdout =~ exact_pattern(<<'EOF')
G2 =
float_(9,9,1,13408218051139917327008657439505375023483221929057707900254\
962082967965638918465272397044054754117520277123188070120899041524740650\
320272590902507813075652);
EOF
*--#] Float_1 :

Loading