tfpuover.pp 758 B

123456789101112131415161718192021222324252627
  1. {$define FAIL}
  2. var
  3. x1,y1,z : double;
  4. function x : double;
  5. begin
  6. x :=((x1+y1)*(x1-y1))*((x1+y1)*(x1-y1));
  7. end;
  8. function y : double;
  9. begin
  10. y :=((x1*y1)/(x1+y1)){$ifdef FAIL}*((x1+y1)*(x1-y1)){$endif};
  11. end;
  12. begin
  13. x1:=2;
  14. y1:=3;
  15. { Explanation a addnote needs the same number of fpu regs
  16. that the max fpu need of left and right node, unless
  17. these two numbers are equal:
  18. this is the reason of the symetric form of this test code PM }
  19. z:=((((x+y)*(x-y))+((x+y)*(x-y)))+(((x+y)*(x-y))+((x+y)*(x-y)))+
  20. (((x+y)*(x-y))+((x+y)*(x-y)))+(((x+y)*(x-y))+((x+y)*(x-y))))+
  21. ((((x+y)*(x-y))+((x+y)*(x-y)))+(((x+y)*(x-y))+((x+y)*(x-y)))+
  22. (((x+y)*(x-y))+((x+y)*(x-y)))+(((x+y)*(x-y))+((x+y)*(x-y))));
  23. Writeln('z = ',z);
  24. end.