mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2010-12-29, 19:20   #111
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

597910 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
Is there one where you can plot multiple expressions ?
Yes, look at the help for the function.
CRGreathouse is offline   Reply With Quote
Old 2010-12-29, 20:09   #112
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Yes, look at the help for the function.
I only see ones that take 1 expression. but I don't know enough about it.

tells you I've been trying stuff with the exponents a while I knew the first 15 off the top of my head lol.

Last fiddled with by science_man_88 on 2010-12-29 at 20:12
science_man_88 is offline   Reply With Quote
Old 2010-12-29, 21:11   #113
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

I can't make sense of your first line, but the help can be accessed through ?ploth (or ?plot for the ASCII art version).
CRGreathouse is offline   Reply With Quote
Old 2010-12-29, 22:13   #114
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
I can't make sense of your first line, but the help can be accessed through ?ploth (or ?plot for the ASCII art version).
I don't see how theses can be used for multiple lines. on the same graph.only thing I can't find to do it in open office is the equivalent to PARI's Euler I think.

Last fiddled with by science_man_88 on 2010-12-29 at 22:29
science_man_88 is offline   Reply With Quote
Old 2010-12-30, 01:26   #115
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

From the User's Guide:
Quote:
3.10.12 ploth(X = a, b, expr , {flags = 0}, {n = 0}): high precision plot of the function y = f (x)
represented by the expression expr , x going from a to b. This opens a specific window (which is
killed whenever you click on it), and returns a four-component vector giving the coordinates of the
bounding box in the form [xmin, xmax , ymin, ymax ].
Important note.: ploth may evaluate expr thousands of times; given the relatively low resolution
of plotting devices, few significant digits of the result will be meaningful. Hence you should keep
the current precision to a minimum (e.g. 9) before calling this function.
n specifies the number of reference point on the graph, where a value of 0 means we use the
hardwired default values (1000 for general plot, 1500 for parametric plot, and 15 for recursive plot).
If no flag is given, expr is either a scalar expression f (X), in which case the plane curve
y = f (X) will be drawn, or a vector [f1 (X), . . . , fk (X)], and then all the curves y = fi (X) will be
drawn in the same window.
The binary digits of flag mean:
• 1 = Parametric: parametric plot. Here expr must be a vector with an even number of
components. Successive pairs are then understood as the parametric coordinates of a plane curve.
Each of these are then drawn.
For instance:
ploth(X=0,2*Pi,[sin(X),cos(X)], "Parametric")
ploth(X=0,2*Pi,[sin(X),cos(X)])
ploth(X=0,2*Pi,[X,X,sin(X),cos(X)], "Parametric")
draw successively a circle, two entwined sinusoidal curves and a circle cut by the line y = x.
• 2 = Recursive: recursive plot. If this flag is set, only one curve can be drawn at a time,
i.e. expr must be either a two-component vector (for a single parametric curve, and the parametric
flag has to be set), or a scalar function. The idea is to choose pairs of successive reference points,
and if their middle point is not too far away from the segment joining them, draw this as a local
approximation to the curve. Otherwise, add the middle point to the reference points. This is fast,
and usually more precise than usual plot. Compare the results of
ploth(X=-1,1, sin(1/X), "Recursive")
ploth(X=-1,1, sin(1/X))
for instance. But beware that if you are extremely unlucky, or choose too few reference points,
you may draw some nice polygon bearing little resemblance to the original curve. For instance you
should never plot recursively an odd function in a symmetric interval around 0. Try
ploth(x = -20, 20, sin(x), "Recursive")
to see why. Hence, it’s usually a good idea to try and plot the same curve with slightly different
parameters.
229
The other values toggle various display options:
• 4 = no Rescale: do not rescale plot according to the computed extrema. This is used in
conjunction with plotscale when graphing multiple functions on a rectwindow (as a plotrecth
call):
s = plothsizes();
plotinit(0, s[2]-1, s[2]-1);
plotscale(0, -1,1, -1,1);
plotrecth(0, t=0,2*Pi, [cos(t),sin(t)], "Parametric|no_Rescale")
plotdraw([0, -1,1]);
This way we get a proper circle instead of the distorted ellipse produced by
ploth(t=0,2*Pi, [cos(t),sin(t)], "Parametric")
• 8 = no X axis: do not print the x-axis.
• 16 = no Y axis: do not print the y-axis.
• 32 = no Frame: do not print frame.
• 64 = no Lines: only plot reference points, do not join them.
• 128 = Points too: plot both lines and points.
• 256 = Splines: use splines to interpolate the points.
• 512 = no X ticks: plot no x-ticks.
• 1024 = no Y ticks: plot no y-ticks.
• 2048 = Same ticks: plot all ticks with the same length.
• 4096 = Complex: is a parametric plot but where each member of expr is considered a complex
number encoding the two coordinates of a point. For instance:
ploth(X=0,2*Pi,exp(I*X), "Complex")
ploth(X=0,2*Pi,[(1+I)*X,exp(I*X)], "Complex")
will draw respectively a circle and a circle cut by the line y = x.
CRGreathouse is offline   Reply With Quote
Old 2010-12-30, 01:34   #116
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
From the User's Guide:
Thanks again, you are very very useful. so I'd need to make a Vec pointing to the vectors I want to plot by the looks of it. okay now the hard part is figuring a curve to plot for the minimum as close as possible. see if we might get closer still.
science_man_88 is offline   Reply With Quote
Old 2010-12-30, 01:38   #117
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
so I'd need to make a Vec pointing to the vectors I want to plot by the looks of it.
Er, no.
CRGreathouse is offline   Reply With Quote
Old 2010-12-30, 01:57   #118
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Er, no.
Quote:
or a vector [f1 (X), . . . , fk (X)], and then all the curves y = fi (X) will be
drawn in the same window.
then why this ?
science_man_88 is offline   Reply With Quote
Old 2010-12-30, 02:42   #119
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

2·11·283 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
the values I get back are under 1 if i go any lower in the last digit of the last exponent
Code:
1.78^exp(-Euler)^-1.8026
gives over 1 for 1 value,
Code:
1.78^exp(-Euler)^-1.8027
makes them all below 1
Maybe you just need to add more digits.

Try: 1.8026486875969201048629953936014631 instead.

Isn't numerology such fun. You could just use interpolation to compute the next MP directly.
retina is online now   Reply With Quote
Old 2010-12-30, 02:46   #120
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
then why this ?
That's a vector of *functions*, not a vector of *vectors*. Big difference.
CRGreathouse is offline   Reply With Quote
Old 2010-12-30, 12:35   #121
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by retina View Post
Maybe you just need to add more digits.

Try: 1.8026486875969201048629953936014631 instead.

Isn't numerology such fun. You could just use interpolation to compute the next MP directly.
Nope it failed to keep them all under 1. closest to that I can get to work is -1.80267698589 so far with 9 digits of precision in my answers.

now got it to -1.8026769850702

Last fiddled with by science_man_88 on 2010-12-30 at 13:19
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for Wagstaff PRP T.Rex Wagstaff PRP Search 191 2021-06-30 17:22
New Wagstaff PRP exponents ryanp Wagstaff PRP Search 26 2013-10-18 01:33
500€ Reward for a proof for the Wagstaff primality test conjecture Tony Reix Wagstaff PRP Search 7 2013-10-10 01:23
Hot tuna! -- a p75 and a p79 by Sam Wagstaff! Batalov GMP-ECM 9 2012-08-24 10:26
30th Wagstaff prime T.Rex Math 0 2007-09-04 07:10

All times are UTC. The time now is 07:40.


Fri Aug 6 07:40:56 UTC 2021 up 14 days, 2:09, 1 user, load averages: 2.72, 2.71, 2.72

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.