mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   FactorDB (https://www.mersenneforum.org/forumdisplay.php?f=94)
-   -   CORS headers for API request (https://www.mersenneforum.org/showthread.php?t=22216)

dylanthinnes 2017-04-22 06:20

CORS headers for API request
 
Hello, I'm very new here (first post), I've run a few searches for info regarding the FactorsDB API and its usability, but haven't gotten much.

I've written a small art project that reduces a quotient to its prime factors to create a unique "solar system" for that number. The project itself, still in early stages, is available here for reference: [URL="http://solsys.me"]http://solsys.me[/URL]

I've considered using FactorDB for larger factoring operations after finding out it has an API, but unfortunately its CORS headers don't allow requests from other webpage domains. I can understand why this would be the case, to limit egregious use of the factorsdb from other webpages, but it is a limit to my project so I thought I might it a shot to ask here.

Is there any way by which to make API requests to FactorsDB from a different domain name? Could Syd potentially modify the CORS headers to allow cross-origin requests?

Furthermore, is there any central repository regarding documentation about the database?

Thanks

Dubslow 2017-04-24 17:44

For numbers less than 10-20 digits, Google or WolframAlpha or a variety of other simple software can do all the factorizations.

FactorDB is for numbers with a minimum size of 30-50 digits, and essentially any numbers of interest are at least 60-100 digits large, with the large majority of "interesting" numbers being more than 100 digits (up to several thousand digits).

Since I suspect you're not interested in solar systems with 10s of trillions of bodies (a 10 digit number), I'd suggest you use one of those other resources I just mentioned. In fact you can write a few hundred lines of python to factor numbers up to 10 digits with no problem in milliseconds (whereas optimized C programs can do it in microseconds or less).


All times are UTC. The time now is 12:34.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.