# areEqual -- determine if solutions are equal

## Synopsis

• Usage:
b = areEqual(x,y)
• Inputs:
• x, a solution or a list of solutions
• y, a solution or a list of solutions
• Optional inputs:
• Projective => ..., default value false, if true then solutions are considered as representatives of points in the projective space
• Tolerance => ..., default value .000001, the tolerance of a numerical computation
• Outputs:
• b, tells if x and y are approximately equal

## Description

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

• solveSystem -- solve a system of polynomial equations
• track -- track a linear segment homotopy given start and target system
• sortSolutions -- sort the list of solutions

## Ways to use areEqual :

• "areEqual(BasicList,BasicList)"
• "areEqual(BasicList,Point)"
• "areEqual(CC,CC)"
• "areEqual(List,List)"
• "areEqual(Matrix,Matrix)"
• "areEqual(MutableMatrix,MutableMatrix)"
• "areEqual(Number,Number)"
• "areEqual(Point,BasicList)"
• "areEqual(Point,Point)"
• areEqual(DualSpace,DualSpace) -- approximate equality of dual spaces
• areEqual(PolySpace,PolySpace) -- approximate equality of subspaces spanned by polynomials

## For the programmer

The object areEqual is .