Benchmark: Savage
12-03-2017, 11:42 PM
Post: #2
 StephenG1CMZ Senior Member Posts: 1,033 Joined: May 2015
RE: Benchmark: Savage
Code:
  //Benchmark: Savage   //PPL V0.1   //OMITTED: "RAD" in the original  EXPORT A_SAVAGE()  BEGIN   LOCAL AA;   AA:=1;   FOR I FROM 1 TO 2499 DO     AA:=TAN(ATAN(EXP(LN(√(AA*AA)))))+1   END;   RETURN AA;  END; #CAS  A_SavageCAS1(f):=  BEGIN   LOCAL aa;   aa:=1;   FOR I FROM 1 TO 2499 DO     aa:=TAN(ATAN(EXP(LN(√(aa*aa)))))+1   END;   RETURN (aa);  END; #END  A_SavageCAS2()  BEGIN   LOCAL aa;   aa:=1;   FOR I FROM 1 TO 2499 DO     aa:=CAS(TAN(ATAN(EXP(LN(√(aa*aa))))))+1;   END;   RETURN (aa);  END;  RRR(RR)  //REPORT RESULT,RELATIVE ERROR  BEGIN   RETURN {RR,((2500-RR)/2500)};  END;  EXPORT SAVAGE()  BEGIN   LOCAL RR;   PRINT();   PRINT("Savage Benchmark");   PRINT({" PPL1: ",TEVAL(RR:=A_SAVAGE()),RRR(RR)});   PRINT({" CAS1: ",TEVAL(RR:=A_SavageCAS1("")),RRR(RR)});     PRINT({" CAS2: ",TEVAL(RR:=A_SavageCAS2()),RRR(RR)});  //RETURN {TEVAL(RR:=SAVAGED()),RR,TEVAL(RR:=SAVAGEDCAS()),RRR(RR)};  END;

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
 « Next Oldest | Next Newest »

 Messages In This Thread Benchmark: Savage - StephenG1CMZ - 12-03-2017, 11:40 PM RE: Benchmark: Savage - StephenG1CMZ - 12-03-2017 11:42 PM RE: Benchmark: Savage - StephenG1CMZ - 12-05-2017, 10:51 PM RE: Benchmark: Savage - StephenG1CMZ - 08-29-2018, 07:37 AM RE: Benchmark: Savage - StephenG1CMZ - 09-28-2018, 07:20 PM RE: Benchmark: Savage - StephenG1CMZ - 09-29-2018, 08:16 AM RE: Benchmark: Savage - Albert Chan - 09-29-2018, 10:47 PM RE: Benchmark: Savage - StephenG1CMZ - 09-30-2018, 07:20 AM RE: Benchmark: Savage - Albert Chan - 09-30-2018, 11:15 AM RE: Benchmark: Savage - Albert Chan - 09-30-2018, 02:13 PM RE: Benchmark: Savage - StephenG1CMZ - 09-30-2018, 04:54 PM RE: Benchmark: Savage - StephenG1CMZ - 10-12-2018, 09:51 AM RE: Benchmark: Savage - StephenG1CMZ - 10-12-2018, 10:46 AM RE: Benchmark: Savage - StephenG1CMZ - 11-01-2018, 08:20 AM

User(s) browsing this thread: 1 Guest(s)