mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PARI/GP (https://www.mersenneforum.org/forumdisplay.php?f=155)
-   -   PARI's commands (https://www.mersenneforum.org/showthread.php?t=13636)

kar_bon 2010-09-13 15:47

Look [url=http://www.aliquot.de/aliquote.htm#diagrams]here[/url] for examples of cycles.

Why don't you read the links i gave in post #1411?

science_man_88 2010-09-13 16:10

I looked all of them over, I have no care to look over 1000's of threads to find any values to check i have no idea what to do obviously, so I'm of no use regardless.

kar_bon 2010-09-13 16:32

That's how I would and do it:

- read more about the problem to understand things like input, output, exceptions
- try an example by hand/calculator to verify if I understand the problem correct and check against other examples found somewhere
- try to find a simple algorithm in the computer language I want to use: datatypes, a simple flow chart, ignoring for first exceptions but only run and give a result
- write the program
- testing the program with my own examples and verify against others
- try to cover the exceptions
- testing again
- optimize (if needed/wanted) the code
- testing again
- in all steps, documenting is essential
-> after all this is done, realease the code/program to others, let them test, too
-> final release

Finding the algorithm and code is the least part of all.
Exceptions or misuse/false inputs are quite more.
The most time is testing and find the limits of the code, emilminate those errors a user can cause and the documentation.

science_man_88 2010-09-13 16:39

inputs are n the number to find the sequence to: the only failure in my code is not checking over v.

science_man_88 2010-09-15 21:41

[CODE]...for(y=1,#v-1,if(d==v[y] || d==1,break(3)))...[/CODE]

is the best thing I can think of lol to replace it with

and I still now get about the temp directory error:

[CODE]sigma: couldn't find a suitable name for a tempdir (MPQS).[/CODE]

CRGreathouse 2010-09-15 22:06

[QUOTE=science_man_88;229888]and I still now get about the temp directory error:

[CODE]sigma: couldn't find a suitable name for a tempdir (MPQS).[/CODE][/QUOTE]

This is clearly a problem in the factoring system. Looking through the source I can see that the message is printed by pari_unique_dir when none of the 600+ temporary directory names it tries to make can be created (for example, they already exist).

This function is called only in the MPQS initialization (mpqs_i).

science_man_88 2010-09-15 22:10

[QUOTE=CRGreathouse;229890]This is clearly a problem in the factoring system. Looking through the source I can see that the message is printed by pari_unique_dir when none of the 600+ temporary directory names it tries to make can be created (for example, they already exist).

This function is called only in the MPQS initialization (mpqs_i).[/QUOTE]

think it's because for some reason i can't write a new file to my main drive at least one level down lol

science_man_88 2010-09-15 22:18

1 Attachment(s)
I get the error below:

CRGreathouse 2010-09-15 23:11

[QUOTE=science_man_88;229892]think it's because for some reason i can't write a new file to my main drive at least one level down lol[/QUOTE]

Well, until you fix that problem you're not going to be able to use MPQS in Pari, since that requires the creation of temportary files and folders.

science_man_88 2010-09-15 23:16

[QUOTE=CRGreathouse;229903]Well, until you fix that problem you're not going to be able to use MPQS in Pari, since that requires the creation of temportary files and folders.[/QUOTE]

is it not possible to get it to write to my portables ? all of them work well last I checked.

CRGreathouse 2010-09-16 00:16

[QUOTE=science_man_88;229906]is it not possible to get it to write to my portables ? all of them work well last I checked.[/QUOTE]

Hmm. It looks like you could make it work if you changed the environment variable "TEMP" to point to your portable drive, it would work. You *may* be able to do this:

[code]@echo off
REM ************************************************
REM * Put this in a file called pari.bat *
REM * Change F:\ to your portable's drive letter *
REM * Change C:\Program... as needed *
REM ************************************************
set TEMP=F:\tmp
cd "C:\Program Files\PARI"
gp[/code]

but I'm not at a Windows machine at the moment so I can't test it.


All times are UTC. The time now is 23:14.

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