[Back]
Block display

SAD UpdateV1.0.10.7.1k64 New functions and bug fixes. NameFK. Oide DateF2015/07/11(Sat) 21:17:29 No.10099

Dear Users,

The changes below are for k64, but should be applied for any version.

(New Functions)
1. Tr[m] to return the trace of a matrix m. Tr[m, f] uses f as the head, instead of List.

2. Diagonal[m] to return a vector with the diagonal components of a matrix m.

3. Rational[n,d] to represent a rational n/d. A few primitive arithmetics are implemented.

4. FromRational[Rational[n,d]] to return a real number n/d.

5. ContinuedFraction[x] to return the continued fraction of a real number x as a List. ContinuedFraction[x,n] returns the firs n components.

6. FromContinuedFraction[f_] returns the Rational corresponding to the continued fraction f.

7. PeriodicR[m] to return the x-y coupling R-matrix to decouple m into diagonal matrices A and B, It returns {R,A,B}. It may return Complex when m is unstable. Only 4x4 is allowed for m.

8. PeriodicOptics[m] to return the periodic Twiss parameters for a 4x4 matrix m. It returns in the same format of the output of Twiss with 27 components. PeriodicOptics[m,d] uses the solution of (I-m).z == d for DX,DPX,DY,DPY parts of the output.

9. FindRoot is extended to accept the form eqs1==eqs2, where eqs1 and eqs2 are lists. Also it allows complex values for the equations. If Complex does not appear in the initial value of the equations, a option Complex->True should be specified. Also Complex->True should be used when the parameters have upvalue definitions for Set. The parameters must be always Real.

10. ArcTan now takes Complex for the arguments.

(Bug fixes)
1. A bug was found in Canvas$Legend to destroy a symbol `y.

2. A bug was found in Complex[a,b] when a or b is not a number.

3. Twiss returned wrong values when the Keyword was "*" (k64 only).

4. MinMax was wrong when the argument was Complex.

- WebForum -