x y
-1 -1
0 1
1 -1
2 -7
3 7
are found by checking all x from negative one million to positive one million and solving for y in the resulting linear equation in y.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For x = -1000000 To 1000000
y = (x * x + 2 * x - 1) / (x * x - 2 * x - 1)
yr = Int(y + 0.5)
If Abs((y - yr) / y) < 0.0000001 Then
Text1.Text = Text1.Text & x & " " & Str(y) & crlf
End If
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2015-06-14 11:28:53 |