Post Reply 
PSLQ
11-29-2017, 08:52 PM (This post was last modified: 11-29-2017 09:32 PM by Han.)
Post: #3
RE: PSLQ
Code for identifying \( x = p_1/q_1 + \sqrt{p_2/q_2} \):

Code:
EXPORT QROOT(x)
BEGIN
  local a:=PSLQ({x^2,x,1});
  if a(1)<0 then a:=-a; end;

  local b:=a(2);
  local c:=a(3);
  a:=a(1);

  if IP(a)<>a then return(x); end;
  if IP(b)<>b then return(x); end;
  if IP(c)<>c then return(x); end;

  local t:=(-b+sqrt(b^2-4*a*c))/(2*a);

  if x==t then
    return(expr("'" + string(QPI(-b/(2*a))) + "+" + string(QPI(sqrt(b^2-4*a*c)/(2*a))) + "'"));
  else
    return(expr("'" + string(QPI(-b/(2*a))) + "-" + string(QPI(sqrt(b^2-4*a*c)/(2*a))) + "'"));
  end;

END;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
PSLQ - Han - 11-29-2017, 08:12 PM
RE: PSLQ - Han - 11-29-2017, 08:42 PM
RE: PSLQ - Han - 11-29-2017 08:52 PM
RE: PSLQ - salvomic - 11-29-2017, 09:28 PM
RE: PSLQ - Han - 11-29-2017, 09:33 PM
RE: PSLQ - salvomic - 11-29-2017, 09:35 PM
RE: PSLQ - salvomic - 11-29-2017, 08:58 PM
RE: PSLQ - AlexFekken - 11-30-2017, 02:16 AM
RE: PSLQ - Han - 11-30-2017, 03:14 AM
RE: PSLQ - AlexFekken - 11-30-2017, 03:56 AM
RE: PSLQ - BruceH - 11-30-2017, 11:10 PM
RE: PSLQ - AlexFekken - 12-02-2017, 11:55 PM
RE: PSLQ - ggauny@live.fr - 11-30-2017, 11:05 AM
RE: PSLQ - Han - 11-30-2017, 12:19 PM
RE: PSLQ - ggauny@live.fr - 11-30-2017, 12:29 PM



User(s) browsing this thread: 3 Guest(s)