From: Nasser M. A. <nm...@12...> - 2024-01-09 18:30:02
|
On 1/9/2024 3:28 AM, Arthur Norman wrote: > That is interesting. Is the Reduce data based on tests where you still put > in "ln" rather than "Log" for logarithms? > log. Not ln. I changed it after I found that ln did not work. > The rubi set of examples is an astonishing resource. You will see from the > Reduce sources interest in it, but I think I commented earlier on the > challenge that working out just how mathematica-style pattern matching is > expected to behave is a big task. Well at one stage I tried getting a > final year student project to take a first stab at that to see how far > that got. It remains on my to-do list but that list is deep. > > At the end of your message you make remarks about resource limiting. We do > have that in Reduce and you may have spotted that most recently I stuck > use of it into the scripts/test1.sh and testall.sh files we used for > running the set of Reduce tests we most often use. I did that in part > to remind myself how it worked - because it is a bit delicate. Also the > CSL (but not other versions) have a related scheme that has finer grain > contol over limits. Given what you are doing if your test scripts are not > TOO hideously long and you pass them over to me I will see about uprating > them to put in timeouts. And POSSIBLY in the process consider making > those nicer to use from Reduce algebraic mode. I used a version of timeout function in Lisp that Francis emailed me, but that unfortunately did not work for me. -------- anti := with!-timeout(10000, % milliseconds; allow ten seconds % See "rlisp/inter.red" and "rubi_red/rubi_parse.red". % cf. errorset, but smacro, so sees args unevaluated. algebraic int( A(counter,1), A(counter,2) )); if atom anti then % integral timed out, succeeded default to false anti := 0 else << anti := car anti; succeeded := anti freeof 'int >>; ---------------------- I tested it on this integrand (-2*sin(2*x)+(cos(x)*sin(x)^3)^(1/2))/(-(cos(x)^3*sin(x))^(1/2)+tan(x)^(1/2)) but it hanged for me. Francis explained to me that it depends on how much RAM I have. I need something that does time limit regardless of amount of RAM. If such function exist in Reduce now or in the future I will be happy to try it. I know very little about Reduce and lisp. All the Reduce scripts I used are posted in each report page under section called "Reduce test script". Here is one such example <https://12000.org/my_notes/CAS_integration_tests/reports/january_2024_reduce/test_cases/0_Independent_test_suites/10_Timofeev_Problems/reduce_script.red> It is run using the command redcsl < reduce_script.red One can edit it to comment out the OUT and SHUT commands to see the output on screen. Currently it has an IF statement in the script to bypass know integrals that was found to HANG. > You also duck out on what you call leaf-count. I am glad you were able to I use standard leafCount command in Mathematica and Maple. But any measure of how large symbolic expression is, will also not. It does not have to be exactly as Mathematica defines it. <https://reference.wolfram.com/language/ref/LeafCount.html> In sagemath I use this function <https://ask.sagemath.org/question/57123/could-we-have-a-leaf_count-function-in-base-sagemath/> > pass that across to Maple but do you have a precise specification of what > you mean by that in case implementing that within Reduce was easy enough > for us to just do that. Eg is it the number of tokens in the displayed > form of an expression not counting operators like +-*/ and not counting > parens? And in sin(1+x) does the word "sin" contrinute to the count? > > Some of what I always hope is that Open Source projects can have an > agility and a responsiveness that differs from commercial juggernauts! > > Arthur > > On Tue, 9 Jan 2024, Nasser M. Abbasi wrote: > >> fyi, >> >> release notes for CAS integration test using Reduce CAS >> -------------------------------------------------------- >> >> Link to this post in plain text is at >> >> <https://12000.org/my_notes/CAS_integration_tests/reports/january_2024_reduce/release_notes_reduce_test_jan_8_2024.txt> >> >> This test was done to compare Reduce CAS integrator with the >> other CAS systems used by the independent CAS integration test program. >> >> The link to this test can be found under the special CAS integration tests >> page >> >> <https://12000.org/my_notes/CAS_integration_tests/indexsection2.htm> >> >> This test used only the first 3,809 integrals from Rubi's test files >> and not the full integration test suite which is over 125,000 integrals. >> >> Reduce integrator was run with algint package loaded. Reduce was >> build from source using CSL lisp. There is also SQL database of all >> the results. >> >> Systems used >> ------------- >> Mathematica 13.3.1 >> Rubi 4.17.3 >> Maple 2023.1 >> Maxima 5.47 using Lisp SBCL 2.3.0 on Linux via sagemath 10.1 >> FriCAS 1.3.9 based on sbcl 2.3.0 on Linux via sagemath 10.1 >> Giac/Xcas 1.9.0-57 on Linux via sagemath 10.1 >> Sympy 1.12 Using Python 3.11.3 on Linux. >> Mupad using Matlab 2021a with Symbolic Math Toolbox Version 8.7 >> Reduce CSL rev. 6657. December 10, 2023. On Linux >> >> The following is the percentage solved >> -------------------------------------- >> >> If an integral is solved, it is assumed correct. Verification is >> currently only done for Mathematica, Rubi and Maple. >> >> 1. Mathematica %99.606 >> 2. Rubi %99.396 >> 3. Fricas %89.525 >> 4. Maple %87.897 >> 5. Giac %79.312 >> 6. Maxima %75.663 >> 7. Mupad %73.326 >> 8. Reduce %72.828 >> 9. Sympy %69.782 >> >> In terms of speed, Reduce integrator was very fast. Actually >> it was the fastest. >> >> The following table gives mean time used to solve one integration problem, >> in seconds. Note that time used by Fricas, GIAC and Maxima is >> inflated as they are called via sagemath which adds extra time due >> to interface overhead and the use of a new subprocess to make >> the call each time. >> >> Maple time is inflated because it is run using all integration >> methods and not just the default one. Otherwise its time used will be >> much less than shown. >> >> 1. Reduce 0.09 sec >> 2. Rubi 0.21 sec >> 3. Maxima 0.23 sec >> 4. Mupad 0.27 sec >> 5. Mathematica 0.29 sec >> 6. Fricas 0.36 sec >> 7. Maple 0.5 sec >> 8. Giac 1.9 sec >> 9. Sympy 3.2 sec >> >> In terms of leaf size, the following table gives average leaf size per CAS. >> >> For reduce, Maple was used to find the leaf size. >> Maple was also used to convert the output of reduce to Latex. >> >> 1. Mathematica 66.49 >> 2. Rubi 71.88 >> 3. Mupad 76.27 >> 4. Maxima 76.7 >> 5. GIAC 102.39 >> 6. Reduce 112.42 >> 7. Maple 114.53 >> 8. Fricas 156.66 >> 9. Sympy 209.21 >> >> Note that all these statistics are applied only to integrals which >> were solved by CAS. Failed integrals are not included in any of the above >> performances result. >> >> There is a link to each reduce script used to run the tests under >> each separate web page for each test file with listing of all >> integrals in it. >> >> Since Reduce currently does not have timelimit command build in, >> it will not be practical to add it to the FULL cas integration tests >> of over 125,000 integrals. >> >> When and if in the future Reduce has a timelimit() command that >> can be used to set timelimit on each call to integration, it will then >> be possible to add it to the full CAS integration test suite. >> >> I hope these result will be useful for some. >> >> Any problems found please let me know. >> >> --Nasser >> >> >> _______________________________________________ >> Reduce-algebra-developers mailing list >> Red...@li... >> https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers >> --Nasser |