Category: Computer Science
Microsoft Visual Studio 2019 Community Version – Creating and Using a C Based Dynamic Link Library © March 22, 2024, by James Pate Williams, Jr.
Create a solution using the DLL C++ DLL template. Rename pch.cpp to pch.c and dllmain.cpp to dllmain.c. Add a header file for the DLL containing the following macro:
#define DLL_Export __declspec(dllexport)
Mark all the exportable functions in the DLL header file with the DLL_Export macro. Suppose the DLL is named CSortingDLL. Next create a console C++ project in the DLL solution to use the DLL. Open the Properties page of the console app. If you want to use the ASCII character set, select the Advanced Configuration Properties, and set the Character Set to Not Set. Now open the C/C++ General Property and under Additional Include Directories add ..\CSortingDLL\;. Do not include the previous period mark. Next open the Linker General Property page. Set Additional Library Directories to ..\CSortingDLL\$(IntDir);. The penultimate step is to set the Linker Input Additional Dependencies to CSortingDLL.lib;. The final step for the app is to add a reference to CSortingDLL. Now you have a functioning DLL and an app using the DLL. If you have any questions, please contact me via email at jamespate@mac.com. Also, Microsoft has a DLL walkthrough complete with source code. I will add my CSortingDLL header source code as a PDF document.
BigInteger Multitasking Agrawal, Kayal, and Saxena (AKS) Primality Test (c) June 19, 2016, by James Pate Williams, Jr. Microsoft TechNet Project Description
This application implements the algorithm described in the paper at the URL http://www.cse.iitk.ac.in/users/manindra/algebra/primality_v6.pdf. I replaced Step 1 of the algorithm with the Miller-Rabin probabilistic primality test. If that test shows that the number is composite, I return the value COMPOSITE. This algorithm is much easier to implement and understand that Wieb Bosmer’s Primality Proving with Cyclotomy also known as the Jacobi sums primality test. As a test we determine that the following Mersenne numbers are prime: M_1279, M_2203, M_2281, M_3217, and M_4253 where M_n = 2 ^ n – 1, and the primes have 386, 664, 687, 969, and 1281 decimal digits, respectively. M_1279 was first proven prime by Raphael M. Robinson on June 25, 1952, using the Lucas-Lehmer test on a SWAC computer. The same author found that M_2203 was prime on October 7, 1952, and M_2281 was prime on October 9, 1952, using the same method and computer. Hans Riesel determined that M_3217 was prime on September 8, 1957, using the Lucas-Lehmer test on a BESK computer. M_4253 was proven prime on November 3, 1961 by Alexander Hurwitz using the Lucas-Lehmer test on an IBM 7090 mainframe computer. See http://www.mersenne.org/primes/ for many more Mersenne primes. All of the computations illustrated below were performed on a late November 2015 Dell XPS 8900 computer with 16 GB RAM Intel(R) Core(TM) i7-6700K CPU @ 4.00 GHz running Windows 10 Pro. The .Net framework is .Net 4.5.2. This is a multitasking version of the original BigInteger variant of the application. Someone with a quad core CPU with 8 virtual processors can try NumberTasks = 8 to see if that speeds up this application more or less. I usually try to limit the number of tasks to actual number of cores.




Preliminary Factorization Results of the Thirteenth Fermat Number (c) February 5, 2024, by James Pate Williams, Jr.
I am working on a factorization of the Thirteenth Fermat number which is 2 ^ 8192 + 1 and is 2,467 decimal digits in length. I am using Pollard’s factoring with cubic integers on the number (2 ^ 2731) ^ 3 + 2. I am also utilizing a homegrown variant of the venerable Pollard and Brent rho method and Arjen K. Lenstra’s Free LIP Elliptic Curve Method. I can factor the seventh Fermat number 2 ^ 128 + 1 in five to thirty minutes using my C# code. The factoring with cubic integers code is in C and uses Free-LIP.
Fermat factoring status (prothsearch.com)
The following is a run of Lenstra’s ECM algorithm:
== Data Menu ==
1 Simple Number
2 Fibonacci Sequence Number
3 Lucas Sequence Number
4 Exit
Enter option (1 – 4): 1
Enter a number to be factored: 2^8192+1
Enter a random number generator seed: 1
== Factoring Menu ==
1 Lenstra’s ECM
2 Lenstra’s Pollard-Rho
3 Pollard’s Factoring with Cubic Integers
Option (1 – 3): 1
2710954639361 p # digits 13
3603109844542291969 p # digits 19
Runtime (s) = 17015.344000
I aborted the previous computation due to the fact I was curious about the number of prime factors that could be found on personal computer. I will try a lot more calculation time in a future run. My homegrown application is able to at least find the first factor of Fermat Number 13.
Latest Factoring Results (c) February 4, 2024, by James Pate Williams, Jr.
I am testing two factoring algorithms: Pollard-Shor-Williams’s method, a home-grown version of the venerable Pollard rho algorithm and Pollard’s factoring with cubic integers. The second recipe is from “The Development of the Number Field Sieve” edited by Arjen K. Lenstra and Hendrik W. Lenstra, Jr. I use the 20-digit test number, 2 ^ 66 + 2 = 73786976294838206466. My method is very fast with this number as shown below:
2^66+2
73786976294838206466 20
Pseudo-Random Number Generator Seed = 1
Number of Tasks = 1
2 p 1
3 p 1
11 p 2
131 p 3
2731 p 4
409891 p 6
7623851 p 7
Elapsed hrs:min:sec.MS = 00:00:00.652
Function Evaluations = 1995
The Pollard factoring with cubic integers takes a long time but is capable of factoring much larger numbers. The results of the full factorization of my test number are:
== Data Menu ==
1 Simple Number
2 Fibonacci Sequence Number
3 Lucas Sequence Number
4 Exit
Enter option (1 – 4): 1
Enter a number to be factored: 2^66+2
Enter a random number generator seed: 1
== Factoring Menu ==
1 Lenstra’s ECM
2 Lenstra’s Pollard-Rho
3 Pollard’s Factoring with Cubic Integers
Option (1 – 3): 3
73786976294838206466
Enter a lower bound : -50000
Enter a upper bound : +50000
Enter b lower bound : +1
Enter b upper bound : +50000
Enter maximum kernels : 1024
Enter algebraic prime count: 300
Enter rational prime count: 300
Enter lo large prime bound: 10000
Enter hi large prime bound: 11000
Numbers sieved = 452239293
Successes 0 gcd(a, b) is 1 = 274929004
Successes 1 rational smooth a + b * r = 181838258
Successes 2 long long smooth = 68959
Successes 3 kernels tested = 535
2 p # digits 1
3 p # digits 1
11 p # digits 2
131 p # digits 3
2731 p # digits 4
409891 p # digits 6
7623851 p # digits 7
Runtime (s) = 36383.696000
It took over ten hours to fully factor, 2 ^ 66 + 2. I am currently attempting to factor the Thirteenth Fermat number which is 2 ^ (2 ^ 13) + 1 = 2 ^ 8192 + 1. The number has 2,467 decimal digits. I am using 399 algebraic prime numbers, 600 rational prime numbers, and 316 “large prime numbers” (primes between 12,000 and 15,000). I have to find the kernels of a 1316 by 1315 matrix. I am trying the factorization using a maximum of 8192 kernels. I suspect this computation will take about a week on my desktop workstation. There is no guarantee that I will find a non-trivial factor of 2 * (2731 ^ 3) + 2.
Open Assault on the Fret Board (c) February 3, 2024, by James Pate Williams, Jr. Using Universal Audio’s Waterfall B3 Hammond Organ Software Emulator with Nomad Factory VST2 Audio Effects in SONAR Platinum Digital Audio Workstation
Up and Down the Stairway to Another Realm Instrumental Rock (c) January 31, 2024, by James Pate Williams, Jr. Using SONAR Platinum and the Universal Audio MOOG Mini-Moog Plug-In
Factorizations of Some Fibonacci Sequence Numbers, Lucas Sequence Numbers and Some Other Numbers Using Arjen K. Lenstra’s Free Large Integer Package and the Elliptic Curve Method (c) January 28, 2024, by James Pate Williams, Jr.
All of the following computations were performed on a late 2015 Dell XPS 8900 personal computer with a 64-bit Intel Core I7 processor @ 4.0GHz with 16GB of DDR2 RAM.
Factorization of Six Fibonacci Sequence Numbers:
Fibonacci 500
# digits 105
5 ^ 2 p # digits 1
15 c # digits 2
101 p # digits 3
401 p # digits 3
1661 c # digits 4
3001 p # digits 4
10291 c # digits 5
570601 p # digits 6
112128001 p # digits 9
1353439001 p # digits 10
28143378001 p # digits 11
5465167948001 p # digits 13
84817574770589638001 p # digits 20
158414167964045700001 p # digits 21
Runtime (s) = 1.206000
Fibonacci 505
# digits 106
5 p # digits 1
743519377 p # digits 9
44614641121 p # digits 11
770857978613 p # digits 12
960700389041 p # digits 12
12588421794766514566269164716286291055826556238643852856601641 p # digits 62
Runtime (s) = 1.959000
Fibonacci 510
# digits 107
2 ^ 3 p # digits 1
11 p # digits 2
61 p # digits 2
1021 p # digits 4
1597 p # digits 4
3469 p # digits 4
3571 p # digits 4
9521 p # digits 4
53551 p # digits 5
95881 p # digits 5
142445 c # digits 6
1158551 p # digits 7
3415914041 p # digits 10
20778644396941 p # digits 14
20862774425341 p # digits 14
81358225616651 c # digits 14
162716451241291 p # digits 15
Runtime (s) = 2.682000
Fibonacci 515
# digits 108
5 p # digits 1
519121 p # digits 6
5644193 p # digits 7
512119709 p # digits 9
84388938382141 p # digits 14
300367026458796424297447559250634818495937628065437243817852436228914621 p # digits 72
Runtime (s) = 7.861000
Fibonacci 520
# digits 109
131 p # digits 3
451 c # digits 3
521 p # digits 3
2081 p # digits 4
2161 p # digits 4
3121 p # digits 4
24571 p # digits 5
90481 p # digits 5
2519895 c # digits 7
21183761 p # digits 8
57089761 p # digits 8
102193207 p # digits 9
1932300241 p # digits 10
14736206161 p # digits 11
5836312049326721 p # digits 16
42426476041450801 p # digits 17
Runtime (s) = 5.155000
Fibonacci 525
# digits 110
2 p # digits 1
5 p # digits 1
421 p # digits 3
701 p # digits 3
3001 p # digits 4
3965 c # digits 4
4201 p # digits 4
141961 p # digits 6
2553601 p # digits 7
230686501 p # digits 9
8288823481 p # digits 10
82061511001 p # digits 11
19072991752501 c # digits 14
8481116649425701 p # digits 16
17231203730201189308301 p # digits 23
Runtime (s) = 2.026000
Factorization of Six Lucas Sequence Numbers
Lucas 340
113709744839525149336680459091826532688903186653162057995534262332121127
# digits 72
7 p # digits 1
2161 p # digits 4
5441 p # digits 4
897601 p # digits 6
23230657239121 p # digits 14
17276792316211992881 p # digits 20
3834936832404134644974961 p # digits 25
Runtime (s) = 109.103000
Lucas 345
# digits 73
2 ^ 2 p # digits 1
31 p # digits 2
461 p # digits 3
1151 p # digits 4
1529 c # digits 4
324301 p # digits 6
686551 p # digits 6
1485571 p # digits 7
4641631 p # digits 7
19965899801 c # digits 11
117169733521 p # digits 12
3490125311294161 p # digits 16
Runtime (s) = 0.032000
Lucas 350
13985374084677485786380981408251904922622980674054858121032362563653278123
# digits 74
3 p # digits 1
401 p # digits 3
2801 p # digits 4
11521 c # digits 5
28001 p # digits 5
570601 p # digits 6
12317523121 p # digits 11
248773766357061401 p # digits 18
7358192362316341243805801 p # digits 25
Runtime (s) = 21.047000
Lucas 355
69362907070206748494476200566565775354902428015845969798000696945226974645
# digits 74
5 p # digits 1
4261 p # digits 4
6673 p # digits 4
75309701 p # digits 8
309273161 p # digits 9
46165371073 p # digits 11
9207609261398081 p # digits 16
49279722643391864192801 p # digits 23
Runtime (s) = 40.726000
Lucas 360
769246427201094785080787978422393713094534885688979999504447628313150135520
# digits 75
2 ^ 5 p # digits 1
3 ^ 2 p # digits 1
23 p # digits 2
41 p # digits 2
105 c # digits 3
107 p # digits 3
241 p # digits 3
2161 p # digits 4
2521 p # digits 4
3439 c # digits 4
8641 p # digits 4
20641 p # digits 5
103681 p # digits 6
109441 p # digits 6
191306797 c # digits 9
10783342081 p # digits 11
13373763765986881 p # digits 17
Runtime (s) = 0.032000
Lucas 365
19076060504701386559675231910437330047906343529583769121365013189782992678011
# digits 77
11 p # digits 2
151549 p # digits 6
514651 p # digits 6
7015301 p # digits 7
8942501 p # digits 7
9157663121 p # digits 10
11899937029 p # digits 11
3252336525249736694804553589211 p # digits 31
The following two numbers were first factorized by J. M. Pollard on an 8-bit Phillips P2012 personal computer with 64 KB RAM and two 640 KB disc drives. The times required by Pollard were 41 and 47 hours.
2^144-3
22300745198530623141535718272648361505980413
# digits 44
492729991333 p # digits 12
45259565260477899162010980272761 p # digits 32
Runtime (s) = 0.086000
2^153+3
11417981541647679048466287755595961091061972995
# digits 47
5 p # digits 1
11 p # digits 2
600696432006490087537 p # digits 21
345598297796034189382757 p # digits 24
Runtime (s) = 0.676000
Partial factorization of the Twelfth Fermat Number 2^4096+1
# digits 1234
114689 p # digits 6
26017793 p # digits 8
63766529 p # digits 8
190274191361 p # digits 12
Runtime (s) = 1532.878000
Triple Integration of Three Functions Using a Monte Carlo Algorithm and an Adaptive Quadrature Method (c) January 15 – 17, January 2024 by James Pate Williams, Jr.
Back in 2015 I translated a multiple integration FORTRAN subroutine to C# using switch statements to emulate conditional and unconditional go to statements. On January 15 – January 16, 2024, I translated my C# source code to vanilla C. Below is the FORTRAN subroutine’s website:
Here are some web pages with examples of triple integration:
3.4: Numerical Approximation of Multiple Integrals – Mathematics LibreTexts
3.3: Triple Integrals – Mathematics LibreTexts
https://tutorial.math.lamar.edu/Classes/CalcIII/IteratedIntegrals.aspx
https://tutorial.math.lamar.edu/Solutions/CalcIII/TripleIntegrals/Prob1.aspx
https://tutorial.math.lamar.edu/Problems/CalcIII/TripleIntegrals.aspx
I created a C test application to attempt to verify some of the results in online sources. For one example I also used my C# program.
== Menu ==
1 f(x, y, z) = 8 * x * y * z
2 f(x, y, z) = 4 * x * x * y - z * z * z
3 f(x, y, z) = x * y + z
5 Exit
Option: 1
f(x, y, z) = 8 * x * y * z
[0.000000, 1.000000] x [1.000000, 2.000000] x [2.000000, 3.000000]
N Integral -+Error % Error
10 0.754706 0.250631 94.968627
100 1.050263 0.126084 92.998246
1000 1.032125 0.036751 93.119165
10000 1.015068 0.011748 93.232880
100000 1.004080 0.003706 93.306131
1000000 1.000650 0.001169 93.329000
nQuadrature Integral Value and Percent Error: 15.000000 0.000000
== Menu ==
1 f(x, y, z) = 8 * x * y * z
2 f(x, y, z) = 4 * x * x * y - z * z * z
3 f(x, y, z) = x * y + z
5 Exit
Option:
== Menu ==
1 f(x, y, z) = 8 * x * y * z
2 f(x, y, z) = 4 * x * x * y - z * z * z
3 f(x, y, z) = x * y + z
5 Exit
Option: 2
f(x, y, z) = 4 * x * x * y - z * z * z
[2.000000, 3.000000] x [-1.000000, 4.000000] x [1.000000, 0.000000]
N Integral -+Error % Error
10 -12.087502 -3.929801 93.596026
100 -17.622371 -1.969516 90.663644
1000 -17.963837 -0.612528 90.482735
10000 -18.129559 -0.197880 90.394936
100000 -18.018231 -0.062690 90.453917
1000000 -17.939045 -0.019779 90.495870
nQuadrature Integral Value and Percent Error: 188.750000 200.000000
== Menu ==
1 f(x, y, z) = 8 * x * y * z
2 f(x, y, z) = 4 * x * x * y - z * z * z
3 f(x, y, z) = x * y + z
5 Exit
Option:
== Menu ==
1 f(x, y, z) = 8 * x * y * z
2 f(x, y, z) = 4 * x * x * y - z * z * z
3 f(x, y, z) = x * y + z
5 Exit
Option: 3
f(x, y, z) = x * y + z
[0.000000, 3.000000] x [0.000000, 2.000000] x [0.000000, 1.000000]
N Integral -+Error % Error
10 9.243858 2.121562 22.967849
100 12.062489 0.808150 0.520745
1000 12.096541 0.255335 0.804509
10000 12.094473 0.081030 0.787275
100000 12.051033 0.025704 0.425271
1000000 12.009588 0.008121 0.079900
nQuadrature Integral Value and Percent Error: 12.000000 0.000000
== Menu ==
1 f(x, y, z) = 8 * x * y * z
2 f(x, y, z) = 4 * x * x * y - z * z * z
3 f(x, y, z) = x * y + z
5 Exit
Option:
desired relative error 0.001
f# integral epsilon number err code
1 +1.4346639496E+000 1.295116E-003 257 0
2 +5.7531639665E-001 5.745470E-004 97 0
3 +2.1527578485E+000 1.793429E-003 45 0
4 +1.5998921741E+001 1.579802E-002 151 0
5 +1.8390615688E-001 6.510967E-005 97 0
6 -4.0003324629E+000 3.747971E-003 17 0
7 +8.6330831791E-001 8.563683E-004 45 0
8 +1.5000000000E+001 8.850520E-011 45 0
9 +1.8875000000E+002 1.109797E-009 45 0
10 +1.2000000000E+001 7.081136E-011 45 0
f# abs errror percent error
1 +9.7938837210E-005 +6.8261387483E-003
2 +4.7748257754E-005 +8.2987892410E-003
3 +6.1501589893E-004 +2.8576909005E-002
4 +1.0782593204E-003 +6.7391207526E-003
5 +9.9602348685E-007 +5.4159040098E-004
6 +3.3246288154E-004 +8.3115720386E-003
7 +2.6210055455E-004 +3.0369237392E-002
8 +8.8506979523E-011 +5.9004653015E-010
9 +1.1098109098E-009 +5.8797928998E-010
10 +7.0812689046E-011 +5.9010574205E-010
Numbers 8-10 in the preceding data correspond to the three three-dimensional functions in the menu illustrated above. The website claims option 2 in the Menu integral is -755 / 4 = -188.75. My calculation is the same magnitude but a positive sign.
Double Integration of Six Functions Using Three Different Quadrature Algorithms (c) January 15, 2024, by James Pate Williams, Jr. All Applicable Rights Reserved
I utilized six functions that have two independent variables. The integration methods were a Monte Carlo probabilistic procedure, TRICUB from “A Numerical Library in C for Scientists and Engineers” by H. T. Lau, PhD, and an algorithm from the ACM publication. I translated the ACM method from FORTRAN to C. See the following online references:
https://math.libretexts.org/Bookshelves/Calculus/Vector_Calculus_(Corral)/03%3A_Multiple_Integrals/3.04%3A_Numerical_Approximation_of_Multiple_Integrals
https://tutorial.math.lamar.edu/Classes/CalcIII/IteratedIntegrals.aspx
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: 1
f(x, y) = 8x + 6y
[0.000000, 1.000000] x [0.000000, 2.000000]
N Integral +-Error % Error
10 18.398218 2.687822 8.008911
100 19.546981 0.838888 2.265096
1000 19.859442 0.266101 0.702789
10000 20.152819 0.082772 0.764093
100000 20.014598 0.026273 0.072988
1000000 20.013430 0.008323 0.067150
NUMAL Integral Value and Percent Error: 22.666667 13.333333
nQuadrature Integral Value and Percent Error: 19.999968 0.000160
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option:
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: 2
f(x, y) = 6 * x * y * y
[1.000000, 2.000000] x [2.000000, 4.000000]
N Integral +-Error % Error
10 6.400786 2.133333 92.380017
100 7.528110 0.951714 91.037965
1000 7.951653 0.294436 90.533746
10000 8.083377 0.094959 90.376933
100000 8.001852 0.029859 90.473986
1000000 8.010457 0.009474 90.463742
NUMAL Integral Value and Percent Error: 204.800000 143.809524
nQuadrature Integral Value and Percent Error: 167.999730 99.999679
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option:
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: 3
f(x, y) = 2 * x - 4 * y * y * y
[-5.000000, 4.000000] x [0.000000, 3.000000]
N Integral +-Error % Error
10 -645.214459 239.379239 14.654172
100 -436.170436 84.138767 42.305498
1000 -471.478924 25.861533 37.635063
10000 -486.066536 8.338088 35.705485
100000 -484.301805 2.644031 35.938915
1000000 -486.527596 0.839338 35.644498
NUMAL Integral Value and Percent Error: -765.000000 1.190476
nQuadrature Integral Value and Percent Error: -755.998734 0.000167
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option:
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: 4
f(x, y) = x * x * y * y + cos(pi * x) + sin(pi * y)
[-2.000000, -1.000000] x [0.000000, 1.000000]
N Integral +-Error % Error
10 1.103184 0.173977 22.003269
100 0.708005 0.063869 49.942995
1000 0.757961 0.021546 46.411062
10000 0.744889 0.006866 47.335224
100000 0.748463 0.002171 47.082576
1000000 0.746892 0.000686 47.193609
NUMAL Integral Value and Percent Error: 1.449491 2.481177
nQuadrature Integral Value and Percent Error: 1.414395 0.000160
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option:
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: 5
f(x, y) = pow(2 * x + 3 * y, -2)
[0.000000, 1.000000] x [1.000000, 2.000000]
N Integral +-Error % Error
10 0.555876 0.235032 1394.669315
100 0.752953 0.323309 1924.579264
1000 0.826769 0.275474 2123.058629
10000 0.927229 0.177631 2393.180482
100000 0.995193 0.097358 2575.927399
1000000 1.291253 0.127325 3371.987619
NUMAL Integral Value and Percent Error: 0.034125 8.243058
nQuadrature Integral Value and Percent Error: 0.037190 0.000639
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option:
== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: 6
f(x, y) = x * exp(x * y)
[0.000000, 1.000000] x [-1.000000, 2.000000]
N Integral +-Error % Error
10 3.217934 1.437426 inf
100 5.562365 0.873166 inf
1000 5.325378 0.225123 inf
10000 5.497069 0.075770 inf
100000 5.362919 0.023344 inf
1000000 5.371802 0.007410 inf
NUMAL Integral Value and Percent Error: 6.162907 inf
nQuadrature Integral Value and Percent Error: 2.562339 inf
Unknown option, please try again.== Menu ==
1 8 * x + 6 * y
2 6 * x * y * y
3 2 * x - 4 * y * y * y
4 x * x * y * y + cos(pi * x) + sin(pi * y)
5 pow(2 * x + 3 * y, -2)
6 x * exp(x * y)
7 Exit
Option: