next | previous | forward | backward | up | top | index | toc | Macaulay2 website
NAGtypes :: areEqual

areEqual -- determine if solutions are equal



The inputs can be complex numbers, points, or lists of points (presented as points or lists of coordinates). The function returns false if the distance between x and y exceeds Tolerance and true, otherwise.

If Projective=>true then 1-\cos\alpha is compared with the Tolerance, where \alpha is the angle between x and y.

i1 : areEqual({{-1,1e-7},{1e-7*ii,-1}}, {{-1, 0}, {0, -1}})

o1 = true
i2 : areEqual({3*ii,2*ii,1+ii}, {-6,-4,-2+2*ii}, Projective=>true)  

o2 = false

For two points A and Bcalling A == Bis equivalent to areEqual(A,B), however, there is no way to specify the optional parameter.

i3 : A = point {{-1,1e-7}, {1e-7*ii,-1}}

o3 = A

o3 : Point
i4 : B = point {{-1,0}, {0, -1}}

o4 = B

o4 : Point
i5 : A == B

o5 = true

See also

Ways to use areEqual :

For the programmer

The object areEqual is a method function with options.