text:
package java.lang;
import java.util.Random;

public final  class Math {

    /**
     * Don't let anyone instantiate this class.
     */
    private Math() {}

    /**
     * The double value that is closer than any other to
     * e, the base of the natural logarithms.
     */
    public static final double E = 2.7182818284590452354;

    /**
     * The double value that is closer than any other to
     * pi, the ratio of the circumference of a circle to its
     * diameter.
     */
    public static final double PI = 3.14159265358979323846;

//    /**
//     * Returns the trigonometric sine of an angle.  Special cases:
//     *

If the argument is NaN or an infinity, then the
//     * result is NaN.
//     *
If the argument is zero, then the result is a zero with the
//     * same sign as the argument.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   an angle, in radians.
//     * @return  the sine of the argument.
//     */
//    public static double sin(double a) {
//	return StrictMath.sin(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the trigonometric cosine of an angle. Special cases:
//     *

If the argument is NaN or an infinity, then the
//     * result is NaN.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   an angle, in radians.
//     * @return  the cosine of the argument.
//     */
//    public static double cos(double a) {
//	return StrictMath.cos(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the trigonometric tangent of an angle.  Special cases:
//     *

If the argument is NaN or an infinity, then the result
//     * is NaN.
//     *
If the argument is zero, then the result is a zero with the
//     * same sign as the argument.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   an angle, in radians.
//     * @return  the tangent of the argument.
//     */
//    public static double tan(double a) {
//	return StrictMath.tan(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the arc sine of an angle, in the range of -pi/2 through
//     * pi/2. Special cases:
//     *

If the argument is NaN or its absolute value is greater
//     * than 1, then the result is NaN.
//     *
If the argument is zero, then the result is a zero with the
//     * same sign as the argument.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   the value whose arc sine is to be returned.
//     * @return  the arc sine of the argument.
//     */
//    public static double asin(double a) {
//	return StrictMath.asin(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the arc cosine of an angle, in the range of 0.0 through
//     * pi.  Special case:
//     *

If the argument is NaN or its absolute value is greater
//     * than 1, then the result is NaN.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   the value whose arc cosine is to be returned.
//     * @return  the arc cosine of the argument.
//     */
//    public static double acos(double a) {
//	return StrictMath.acos(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the arc tangent of an angle, in the range of -pi/2
//     * through pi/2.  Special cases:
//     *

If the argument is NaN, then the result is NaN.
//     *
If the argument is zero, then the result is a zero with the
//     * same sign as the argument.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   the value whose arc tangent is to be returned.
//     * @return  the arc tangent of the argument.
//     */
//    public static double atan(double a) {
//	return StrictMath.atan(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Converts an angle measured in degrees to an approximately
//     * equivalent angle measured in radians.  The conversion from
//     * degrees to radians is generally inexact.
//     *
//     * @param   angdeg   an angle, in degrees
//     * @return  the measurement of the angle angdeg
//     *          in radians.
//     * @since   1.2
//     */
//    public static double toRadians(double angdeg) {
//	return angdeg / 180.0 * PI;
//    }
//
//    /**
//     * Converts an angle measured in radians to an approximately
//     * equivalent angle measured in degrees.  The conversion from
//     * radians to degrees is generally inexact; users should
//     * not expect cos(toRadians(90.0)) to exactly
//     * equal 0.0.
//     *
//     * @param   angrad   an angle, in radians
//     * @return  the measurement of the angle angrad
//     *          in degrees.
//     * @since   1.2
//     */
//    public static double toDegrees(double angrad) {
//	return angrad * 180.0 / PI;
//    }
//
//    /**
//     * Returns Euler's number e raised to the power of a
//     * double value.  Special cases:
//     *

If the argument is NaN, the result is NaN.
//     *
If the argument is positive infinity, then the result is
//     * positive infinity.
//     *
If the argument is negative infinity, then the result is
//     * positive zero.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   the exponent to raise e to.
//     * @return  the value ea,
//     *          where e is the base of the natural logarithms.
//     */
//    public static double exp(double a) {
//	return StrictMath.exp(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the natural logarithm (base e) of a double
//     * value.  Special cases:
//     *

If the argument is NaN or less than zero, then the result
//     * is NaN.
//     *
If the argument is positive infinity, then the result is
//     * positive infinity.
//     *
If the argument is positive zero or negative zero, then the
//     * result is negative infinity.

//     *

//     * A result must be within 1 ulp of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   a   a number greater than 0.0.
//     * @return  the value ln a, the natural logarithm of
//     *          a.
//     */
//    public static double log(double a) {
//	return StrictMath.log(a); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the correctly rounded positive square root of a
//     * double value.
//     * Special cases:
//     *

If the argument is NaN or less than zero, then the result
//     * is NaN.
//     *
If the argument is positive infinity, then the result is positive
//     * infinity.
//     *
If the argument is positive zero or negative zero, then the
//     * result is the same as the argument.

//     * Otherwise, the result is the double value closest to
//     * the true mathematical square root of the argument value.
//     *
//     * @param   a   a value.
//     *
//     * @return  the positive square root of a.
//     *          If the argument is NaN or less than zero, the result is NaN.
//     */
//    public static double sqrt(double a) {
//	return StrictMath.sqrt(a); // default impl. delegates to StrictMath
//				   // Note that hardware sqrt instructions
//				   // frequently can be directly used by JITs
//				   // and should be much faster than doing
//				   // Math.sqrt in software.
//    }
//
//    /**
//     * Computes the remainder operation on two arguments as prescribed
//     * by the IEEE 754 standard.
//     * The remainder value is mathematically equal to
//     * f1 - f2 × n,
//     * where n is the mathematical integer closest to the exact
//     * mathematical value of the quotient f1/f2, and if two
//     * mathematical integers are equally close to f1/f2,
//     * then n is the integer that is even. If the remainder is
//     * zero, its sign is the same as the sign of the first argument.
//     * Special cases:
//     *

If either argument is NaN, or the first argument is infinite,
//     * or the second argument is positive zero or negative zero, then the
//     * result is NaN.
//     *
If the first argument is finite and the second argument is
//     * infinite, then the result is the same as the first argument.

//     *
//     * @param   f1   the dividend.
//     * @param   f2   the divisor.
//     * @return  the remainder when f1 is divided by
//     *          f2.
//     */
//    public static double IEEEremainder(double f1, double f2) {
//        return StrictMath.IEEEremainder(f1, f2); // delegate to StrictMath
//    }
//
//    /**
//     * Returns the smallest (closest to negative infinity)
//     * double value that is not less than the argument and is
//     * equal to a mathematical integer. Special cases:
//     *

If the argument value is already equal to a mathematical
//     * integer, then the result is the same as the argument.
//     *
If the argument is NaN or an infinity or positive zero or negative
//     * zero, then the result is the same as the argument.
//     *
If the argument value is less than zero but greater than -1.0,
//     * then the result is negative zero.

//     * Note that the value of Math.ceil(x) is exactly the
//     * value of -Math.floor(-x).
//     *
//     * @param   a   a value.
//     *
//     * @return  the smallest (closest to negative infinity)
//     *          floating-point value that is not less than the argument
//     *          and is equal to a mathematical integer.
//     */
    public static double ceil(double a) {
        while (a / 10.0 != 234.3) {
            a -= 2.123;
        }
        return a;
    }
//
//    /**
//     * Returns the largest (closest to positive infinity)
//     * double value that is not greater than the argument and
//     * is equal to a mathematical integer. Special cases:
//     *

If the argument value is already equal to a mathematical
//     * integer, then the result is the same as the argument.
//     *
If the argument is NaN or an infinity or positive zero or
//     * negative zero, then the result is the same as the argument.

//     *
//     * @param   a   a value.
//     *
//     * @return  the largest (closest to positive infinity)
//     *          floating-point value that is not greater than the argument
//     *          and is equal to a mathematical integer.
//     */
    public static double floor(double a) {
        while (a / 10.0 != 234.3) {
            a -= 2.123;
        }
        return a;
    }
//
//    /**
//     * Returns the double value that is closest in value
//     * to the argument and is equal to a mathematical integer. If two
//     * double values that are mathematical integers are
//     * equally close, the result is the integer value that is
//     * even. Special cases:
//     *

If the argument value is already equal to a mathematical
//     * integer, then the result is the same as the argument.
//     *
If the argument is NaN or an infinity or positive zero or negative
//     * zero, then the result is the same as the argument.

//     *
//     * @param   a   a double value.
//     * @return  the closest floating-point value to a that is
//     *          equal to a mathematical integer.
//     */
    public static double rint(double a) {
	return StrictMath.rint(a); // default impl. delegates to StrictMath
    }
//
//    /**
//     * Converts rectangular coordinates (x, y)
//     * to polar (r, theta).
//     * This method computes the phase theta by computing an arc tangent
//     * of y/x in the range of -pi to pi. Special
//     * cases:
//     *

If either argument is NaN, then the result is NaN.
//     *
If the first argument is positive zero and the second argument
//     * is positive, or the first argument is positive and finite and the
//     * second argument is positive infinity, then the result is positive
//     * zero.
//     *
If the first argument is negative zero and the second argument
//     * is positive, or the first argument is negative and finite and the
//     * second argument is positive infinity, then the result is negative zero.
//     *
If the first argument is positive zero and the second argument
//     * is negative, or the first argument is positive and finite and the
//     * second argument is negative infinity, then the result is the
//     * double value closest to pi.
//     *
If the first argument is negative zero and the second argument
//     * is negative, or the first argument is negative and finite and the
//     * second argument is negative infinity, then the result is the
//     * double value closest to -pi.
//     *
If the first argument is positive and the second argument is
//     * positive zero or negative zero, or the first argument is positive
//     * infinity and the second argument is finite, then the result is the
//     * double value closest to pi/2.
//     *
If the first argument is negative and the second argument is
//     * positive zero or negative zero, or the first argument is negative
//     * infinity and the second argument is finite, then the result is the
//     * double value closest to -pi/2.
//     *
If both arguments are positive infinity, then the result is the
//     * double value closest to pi/4.
//     *
If the first argument is positive infinity and the second argument
//     * is negative infinity, then the result is the double
//     * value closest to 3*pi/4.
//     *
If the first argument is negative infinity and the second argument
//     * is positive infinity, then the result is the double value
//     * closest to -pi/4.
//     *
If both arguments are negative infinity, then the result is the
//     * double value closest to -3*pi/4.

//     *

//     * A result must be within 2 ulps of the correctly rounded result.  Results
//     * must be semi-monotonic.
//     *
//     * @param   y   the ordinate coordinate
//     * @param   x   the abscissa coordinate
//     * @return  the theta component of the point
//     *          (r, theta)
//     *          in polar coordinates that corresponds to the point
//     *          (x, y) in Cartesian coordinates.
//     */
//    public static double atan2(double y, double x) {
//	return StrictMath.atan2(y, x); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the value of the first argument raised to the power of the
//     * second argument. Special cases:
//     *
//     *

If the second argument is positive or negative zero, then the
//     * result is 1.0.
//     *
If the second argument is 1.0, then the result is the same as the
//     * first argument.
//     *
If the second argument is NaN, then the result is NaN.
//     *
If the first argument is NaN and the second argument is nonzero,
//     * then the result is NaN.
//     *
//     *
If
//     *

//     *
the absolute value of the first argument is greater than 1
//     * and the second argument is positive infinity, or
//     *
the absolute value of the first argument is less than 1 and
//     * the second argument is negative infinity,
//     *

//     * then the result is positive infinity.
//     *
//     *
If
//     *

//     *
the absolute value of the first argument is greater than 1 and
//     * the second argument is negative infinity, or
//     *
the absolute value of the
//     * first argument is less than 1 and the second argument is positive
//     * infinity,
//     *

//     * then the result is positive zero.
//     *
//     *
If the absolute value of the first argument equals 1 and the
//     * second argument is infinite, then the result is NaN.
//     *
//     *
If
//     *

//     *
the first argument is positive zero and the second argument
//     * is greater than zero, or
//     *
the first argument is positive infinity and the second
//     * argument is less than zero,
//     *

//     * then the result is positive zero.
//     *
//     *
If
//     *

//     *
the first argument is positive zero and the second argument
//     * is less than zero, or
//     *
the first argument is positive infinity and the second
//     * argument is greater than zero,
//     *

//     * then the result is positive infinity.
//     *
//     *
If
//     *

//     *
the first argument is negative zero and the second argument
//     * is greater than zero but not a finite odd integer, or
//     *
the first argument is negative infinity and the second
//     * argument is less than zero but not a finite odd integer,
//     *

//     * then the result is positive zero.
//     *
//     *
If
//     *

//     *
the first argument is negative zero and the second argument
//     * is a positive finite odd integer, or
//     *
the first argument is negative infinity and the second
//     * argument is a negative finite odd integer,
//     *

//     * then the result is negative zero.
//     *
//     *
If
//     *

//     *
the first argument is negative zero and the second argument
//     * is less than zero but not a finite odd integer, or
//     *
the first argument is negative infinity and the second
//     * argument is greater than zero but not a finite odd integer,
//     *

//     * then the result is positive infinity.
//     *
//     *
If
//     *

//     *
the first argument is negative zero and the second argument
//     * is a negative finite odd integer, or
//     *
the first argument is negative infinity and the second
//     * argument is a positive finite odd integer,
//     *

//     * then the result is negative infinity.
//     *
//     *
If the first argument is finite and less than zero
//     *

//     *
 if the second argument is a finite even integer, the
//     * result is equal to the result of raising the absolute value of
//     * the first argument to the power of the second argument
//     *
//     *
if the second argument is a finite odd integer, the result
//     * is equal to the negative of the result of raising the absolute
//     * value of the first argument to the power of the second
//     * argument
//     *
//     *
if the second argument is finite and not an integer, then
//     * the result is NaN.
//     *

//     *
//     *
If both arguments are integers, then the result is exactly equal
//     * to the mathematical result of raising the first argument to the power
//     * of the second argument if that result can in fact be represented
//     * exactly as a double value.

//     *
//     *
(In the foregoing descriptions, a floating-point value is
//     * considered to be an integer if and only if it is finite and a
//     * fixed point of the method {@link #ceil <tt>ceil</tt>} or,
//     * equivalently, a fixed point of the method {@link #floor
//     * <tt>floor</tt>}. A value is a fixed point of a one-argument
//     * method if and only if the result of applying the method to the
//     * value is equal to the value.)
//     *
//     *
A result must be within 1 ulp of the correctly rounded
//     * result.  Results must be semi-monotonic.
//     *
//     * @param   a   the base.
//     * @param   b   the exponent.
//     * @return  the value ab.
//     */
//    public static double pow(double a, double b) {
//	return StrictMath.pow(a, b); // default impl. delegates to StrictMath
//    }
//
//    /**
//     * Returns the closest int to the argument. The
//     * result is rounded to an integer by adding 1/2, taking the
//     * floor of the result, and casting the result to type int.
//     * In other words, the result is equal to the value of the expression:
//     *

(int)Math.floor(a + 0.5f)

//     *

//     * Special cases:
//     *

If the argument is NaN, the result is 0.
//     *
If the argument is negative infinity or any value less than or
//     * equal to the value of Integer.MIN_VALUE, the result is
//     * equal to the value of Integer.MIN_VALUE.
//     *
If the argument is positive infinity or any value greater than or
//     * equal to the value of Integer.MAX_VALUE, the result is
//     * equal to the value of Integer.MAX_VALUE.

//     *
//     * @param   a   a floating-point value to be rounded to an integer.
//     * @return  the value of the argument rounded to the nearest
//     *          int value.
//     * @see     java.lang.Integer#MAX_VALUE
//     * @see     java.lang.Integer#MIN_VALUE
//     */
//    public static int round(float a) {
//	return (int)floor(a + 0.5f);
//    }
//
//    /**
//     * Returns the closest long to the argument. The result
//     * is rounded to an integer by adding 1/2, taking the floor of the
//     * result, and casting the result to type long. In other
//     * words, the result is equal to the value of the expression:
//     *

(long)Math.floor(a + 0.5d)

//     *

//     * Special cases:
//     *

If the argument is NaN, the result is 0.
//     *
If the argument is negative infinity or any value less than or
//     * equal to the value of Long.MIN_VALUE, the result is
//     * equal to the value of Long.MIN_VALUE.
//     *
If the argument is positive infinity or any value greater than or
//     * equal to the value of Long.MAX_VALUE, the result is
//     * equal to the value of Long.MAX_VALUE.

//     *
//     * @param   a   a floating-point value to be rounded to a
//     *		long.
//     * @return  the value of the argument rounded to the nearest
//     *          long value.
//     * @see     java.lang.Long#MAX_VALUE
//     * @see     java.lang.Long#MIN_VALUE
//     */
    public static long round(double a) {
	return (long)floor(a + 0.5d);
    }
//
//    private static Random randomNumberGenerator;
//
//    private static synchronized void initRNG() {
//        if (randomNumberGenerator == null)
//            randomNumberGenerator = new Random();
//    }
//
//    /**
//     * Returns a double value with a positive sign, greater
//     * than or equal to 0.0 and less than 1.0.
//     * Returned values are chosen pseudorandomly with (approximately)
//     * uniform distribution from that range.
//     *

//     * When this method is first called, it creates a single new
//     * pseudorandom-number generator, exactly as if by the expression
//     *

new java.util.Random

//     * This new pseudorandom-number generator is used thereafter for all
//     * calls to this method and is used nowhere else.
//     *

//     * This method is properly synchronized to allow correct use by more
//     * than one thread. However, if many threads need to generate
//     * pseudorandom numbers at a great rate, it may reduce contention for
//     * each thread to have its own pseudorandom-number generator.
//     *
//     * @return  a pseudorandom double greater than or equal
//     * to 0.0 and less than 1.0.
//     * @see     java.util.Random#nextDouble()
//     */
    public static double random() {
        return new Random().nextDouble();
    }
//
//    /**
//     * Returns the absolute value of an int value.
//     * If the argument is not negative, the argument is returned.
//     * If the argument is negative, the negation of the argument is returned.
//     *

//     * Note that if the argument is equal to the value of
//     * Integer.MIN_VALUE, the most negative representable
//     * int value, the result is that same value, which is
//     * negative.
//     *
//     * @param   a   the argument whose absolute value is to be determined
//     * @return  the absolute value of the argument.
//     * @see     java.lang.Integer#MIN_VALUE
//     */
//    public static int abs(int a) {
//	return (a < 0) ? -a : a;
//    }
//
//    /**
//     * Returns the absolute value of a long value.
//     * If the argument is not negative, the argument is returned.
//     * If the argument is negative, the negation of the argument is returned.
//     *

//     * Note that if the argument is equal to the value of
//     * Long.MIN_VALUE, the most negative representable
//     * long value, the result is that same value, which is
//     * negative.
//     *
//     * @param   a   the argument whose absolute value is to be determined
//     * @return  the absolute value of the argument.
//     * @see     java.lang.Long#MIN_VALUE
//     */
//    public static long abs(long a) {
//	return (a < 0) ? -a : a;
//    }
//
//    /**
//     * Returns the absolute value of a float value.
//     * If the argument is not negative, the argument is returned.
//     * If the argument is negative, the negation of the argument is returned.
//     * Special cases:
//     *

If the argument is positive zero or negative zero, the
//     * result is positive zero.
//     *
If the argument is infinite, the result is positive infinity.
//     *
If the argument is NaN, the result is NaN.

//     * In other words, the result is the same as the value of the expression:
//     *

Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))

//     *
//     * @param   a   the argument whose absolute value is to be determined
//     * @return  the absolute value of the argument.
//     */
//    public static float abs(float a) {
//        return (a <= 0.0F) ? 0.0F - a : a;
//    }
//
//    /**
//     * Returns the absolute value of a double value.
//     * If the argument is not negative, the argument is returned.
//     * If the argument is negative, the negation of the argument is returned.
//     * Special cases:
//     *

If the argument is positive zero or negative zero, the result
//     * is positive zero.
//     *
If the argument is infinite, the result is positive infinity.
//     *
If the argument is NaN, the result is NaN.

//     * In other words, the result is the same as the value of the expression:
//     *
Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)
//     *
//     * @param   a   the argument whose absolute value is to be determined
//     * @return  the absolute value of the argument.
//     */
//    public static double abs(double a) {
//        return (a <= 0.0D) ? 0.0D - a : a;
//    }
//
//    /**
//     * Returns the greater of two int values. That is, the
//     * result is the argument closer to the value of
//     * Integer.MAX_VALUE. If the arguments have the same value,
//     * the result is that same value.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the larger of a and b.
//     * @see     java.lang.Long#MAX_VALUE
//     */
//    public static int max(int a, int b) {
//	return (a >= b) ? a : b;
//    }
//
//    /**
//     * Returns the greater of two long values. That is, the
//     * result is the argument closer to the value of
//     * Long.MAX_VALUE. If the arguments have the same value,
//     * the result is that same value.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the larger of a and b.
//     * @see     java.lang.Long#MAX_VALUE
//     */
//    public static long max(long a, long b) {
//	return (a >= b) ? a : b;
//    }
//
//    private static long negativeZeroFloatBits = Float.floatToIntBits(-0.0f);
//    private static long negativeZeroDoubleBits = Double.doubleToLongBits(-0.0d);
//
//    /**
//     * Returns the greater of two float values.  That is,
//     * the result is the argument closer to positive infinity. If the
//     * arguments have the same value, the result is that same
//     * value. If either value is NaN, then the result is NaN.  Unlike
//     * the the numerical comparison operators, this method considers
//     * negative zero to be strictly smaller than positive zero. If one
//     * argument is positive zero and the other negative zero, the
//     * result is positive zero.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the larger of a and b.
//     */
//    public static float max(float a, float b) {
//        if (a != a) return a;	// a is NaN
//	if ((a == 0.0f) && (b == 0.0f)
//	    && (Float.floatToIntBits(a) == negativeZeroFloatBits)) {
//	    return b;
//	}
//	return (a >= b) ? a : b;
//    }
//
//    /**
//     * Returns the greater of two double values.  That
//     * is, the result is the argument closer to positive infinity. If
//     * the arguments have the same value, the result is that same
//     * value. If either value is NaN, then the result is NaN.  Unlike
//     * the the numerical comparison operators, this method considers
//     * negative zero to be strictly smaller than positive zero. If one
//     * argument is positive zero and the other negative zero, the
//     * result is positive zero.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the larger of a and b.
//     */
//    public static double max(double a, double b) {
//        if (a != a) return a;	// a is NaN
//	if ((a == 0.0d) && (b == 0.0d)
//	    && (Double.doubleToLongBits(a) == negativeZeroDoubleBits)) {
//	    return b;
//	}
//	return (a >= b) ? a : b;
//    }
//
//    /**
//     * Returns the smaller of two int values. That is,
//     * the result the argument closer to the value of
//     * Integer.MIN_VALUE.  If the arguments have the same
//     * value, the result is that same value.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the smaller of a and b.
//     * @see     java.lang.Long#MIN_VALUE
//     */
//    public static int min(int a, int b) {
//	return (a <= b) ? a : b;
//    }
//
//    /**
//     * Returns the smaller of two long values. That is,
//     * the result is the argument closer to the value of
//     * Long.MIN_VALUE. If the arguments have the same
//     * value, the result is that same value.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the smaller of a and b.
//     * @see     java.lang.Long#MIN_VALUE
//     */
//    public static long min(long a, long b) {
//	return (a <= b) ? a : b;
//    }
//
//    /**
//     * Returns the smaller of two float values.  That is,
//     * the result is the value closer to negative infinity. If the
//     * arguments have the same value, the result is that same
//     * value. If either value is NaN, then the result is NaN.  Unlike
//     * the the numerical comparison operators, this method considers
//     * negative zero to be strictly smaller than positive zero.  If
//     * one argument is positive zero and the other is negative zero,
//     * the result is negative zero.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the smaller of a and b.
//     */
//    public static float min(float a, float b) {
//        if (a != a) return a;	// a is NaN
//	if ((a == 0.0f) && (b == 0.0f)
//	    && (Float.floatToIntBits(b) == negativeZeroFloatBits)) {
//	    return b;
//	}
//	return (a <= b) ? a : b;
//    }
//
//    /**
//     * Returns the smaller of two double values.  That
//     * is, the result is the value closer to negative infinity. If the
//     * arguments have the same value, the result is that same
//     * value. If either value is NaN, then the result is NaN.  Unlike
//     * the the numerical comparison operators, this method considers
//     * negative zero to be strictly smaller than positive zero. If one
//     * argument is positive zero and the other is negative zero, the
//     * result is negative zero.
//     *
//     * @param   a   an argument.
//     * @param   b   another argument.
//     * @return  the smaller of a and b.
//     */
//    public static double min(double a, double b) {
//        if (a != a) return a;	// a is NaN
//	if ((a == 0.0d) && (b == 0.0d)
//	    && (Double.doubleToLongBits(b) == negativeZeroDoubleBits)) {
//	    return b;
//	}
//	return (a <= b) ? a : b;
//    }

}

max_stars_repo_name: HarvardPL/cryptoerase

max_issues_repo_name: HarvardPL/cryptoerase

max_forks_repo_name: HarvardPL/cryptoerase


text:
using Revise
using ADCME
using ADSeismic
using PyPlot
using DelimitedFiles

num_repeat = 3

open("acoustic-time-$(has_gpu() ? "gpu" : "cpu").txt", "a") do io
  write(io, "===============================================\n")
end

for (k, scale) in enumerate(101:100:1001)

    param = AcousticPropagatorParams(NX=scale, NY=scale, NSTEP=100, DELTAT=1e-4,  DELTAX=1.0, DELTAY=1.0)

    rc = Gauss(param, 1/pi, 100, 1e6)
    srci = [div(param.NX,2)]
    srcj = [div(param.NY,2)]
    srcv = reshape(rc, :, 1)
    src = AcousticSource(srci, srcj, srcv)

    C = 3300*ones(param.NX+2, param.NY+2)
    model = AcousticPropagatorSolver(param, src, C)

    sess = Session(); init(sess)
    u = run(sess, model.u)

    time = 0
    for i = 1:num_repeat
      init(sess)
      time += (@timed run(sess, model.u))[2]
    end
    time /= num_repeat

    @info time, scale
    open("acoustic-time-$(has_gpu() ? "gpu" : "cpu").txt", "a") do io
      writedlm(io, [scale*scale time])
    end

end

# figure(figsize=(4.5,3))
# scales = readdlm("acoustic-scales.txt")
# cpu = readdlm("acoustic-time_cpu.txt")
# gpu = readdlm("acoustic-time_gpu.txt")
# plot(scales, cpu, ".-", label="CPU")
# plot(scales, gpu, ".-", label="GPU")
# ticklabel_format(style="sci", axis="x", scilimits=(0,0))
# # xlabel("Degrees of freedom")
# xlabel("Nx × Ny")
# ylabel("Time (sec)")
# grid("on", which="both")
# legend()
# savefig("acoustic_benchmark.png", bbox_inches="tight")
# savefig("acoustic_benchmark.pdf", bbox_inches="tight")

ext: jl


text:
# Parts of this code were taken / derived from Graphs.jl. See LICENSE for
# licensing details.

# The Bellman Ford algorithm for single-source shortest path

###################################################################
#
#   The type that capsulates the state of Bellman Ford algorithm
#
###################################################################
using Base.Threads

struct NegativeCycleError <: Exception end

# AbstractPathState is defined in core
"""
    BellmanFordState{T, U}

An `AbstractPathState` designed for Bellman-Ford shortest-paths calculations.
"""
struct BellmanFordState{T<:Real, U<:Integer} <: AbstractPathState
    parents::Vector{U}
    dists::Vector{T}
end

"""
    bellman_ford_shortest_paths(g, s, distmx=weights(g))
    bellman_ford_shortest_paths(g, ss, distmx=weights(g))

Compute shortest paths between a source `s` (or list of sources `ss`) and all
other nodes in graph `g` using the [Bellman-Ford algorithm](http://en.wikipedia.org/wiki/Bellman–Ford_algorithm).
Return a [`LightGraphs.BellmanFordState`](@ref) with relevant traversal information.
"""
function bellman_ford_shortest_paths(
    graph::AbstractGraph{U},
    sources::AbstractVector{<:Integer},
    distmx::AbstractMatrix{T}=weights(graph)
    ) where T<:Real where U<:Integer

    active = Set{U}(sources)
    sizehint!(active, nv(graph))
    dists = fill(typemax(T), nv(graph))
    parents = zeros(U, nv(graph))
    dists[sources] .= 0
    no_changes = false

    for i in one(U):nv(graph)
        no_changes = true
        new_active = Set{U}()
        for u in active
            for v in outneighbors(graph, u)
                relax_dist = distmx[u, v] + dists[u]
                if dists[v] > relax_dist
                    dists[v] = relax_dist
                    parents[v] = u
                    no_changes = false
                    push!(new_active, v)
                end
            end
        end
        if no_changes
            break
        end
        active = new_active
    end
    no_changes || throw(NegativeCycleError())
    return BellmanFordState(parents, dists)
end

bellman_ford_shortest_paths(
    graph::AbstractGraph{U},
    v::Integer,
    distmx::AbstractMatrix{T} = weights(graph);
    ) where T<:Real where U<:Integer = bellman_ford_shortest_paths(graph, [v], distmx)

has_negative_edge_cycle(g::AbstractGraph) = false

function has_negative_edge_cycle(
    g::AbstractGraph{U},
    distmx::AbstractMatrix{T}
    ) where T<:Real where U<:Integer
    try
        bellman_ford_shortest_paths(g, vertices(g), distmx)
    catch e
        isa(e, NegativeCycleError) && return true
    end
    return false
end

"""
    enumerate_paths(state[, vs])

Given a path state `state` of type `AbstractPathState`, return a
vector (indexed by vertex) of the paths between the source vertex used to
compute the path state and a single destination vertex, a list of destination
vertices, or the entire graph. For multiple destination vertices, each
path is represented by a vector of vertices on the path between the source and
the destination. Nonexistent paths will be indicated by an empty vector. For
single destinations, the path is represented by a single vector of vertices,
and will be length 0 if the path does not exist.

### Implementation Notes
For Floyd-Warshall path states, please note that the output is a bit different,
since this algorithm calculates all shortest paths for all pairs of vertices:
`enumerate_paths(state)` will return a vector (indexed by source vertex) of
vectors (indexed by destination vertex) of paths. `enumerate_paths(state, v)`
will return a vector (indexed by destination vertex) of paths from source `v`
to all other vertices. In addition, `enumerate_paths(state, v, d)` will return
a vector representing the path from vertex `v` to vertex `d`.
"""
function enumerate_paths(state::AbstractPathState, vs::Vector{T}) where T<:Integer
    parents = state.parents

    num_vs = length(vs)
    all_paths = Vector{Vector{T}}(undef, num_vs)
    for i = 1:num_vs
        all_paths[i] = Vector{T}()
        index = vs[i]
        if parents[index] != 0 || parents[index] == index
            while parents[index] != 0
                push!(all_paths[i], index)
                index = parents[index]
            end
            push!(all_paths[i], index)
            reverse!(all_paths[i])
        end
    end
    all_paths
end

enumerate_paths(state::AbstractPathState, v) = enumerate_paths(state, [v])[1]
enumerate_paths(state::AbstractPathState) = enumerate_paths(state, [1:length(state.parents);])


text:
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder

name = "GEOS"
version = v"3.9.0"

# Collection of sources required to build GEOS
sources = [
    ArchiveSource("http://download.osgeo.org/geos/geos-$version.tar.bz2",
                  "bd8082cf12f45f27630193c78bdb5a3cba847b81e72b20268356c2a4fc065269")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/geos-*/

# arm complains about duplicate symbols unless we disable inlining
EXTRA_CONFIGURE_FLAGS=()
if [[ ${target} == arm* ]]; then
    EXTRA_CONFIGURE_FLAGS+=(--disable-inline)
fi
export CFLAGS="-O2"
export CXXFLAGS="-O2"
autoreconf -vi
./configure --prefix=$prefix --build=${MACHTYPE} --host=$target --enable-shared --disable-static ${EXTRA_CONFIGURE_FLAGS[@]}
make -j${nproc}
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = expand_cxxstring_abis(supported_platforms())

# The products that we will ensure are always built
products = [
    LibraryProduct("libgeos_c", :libgeos),
    LibraryProduct(["libgeos", "libgeos-$(version.major)-$(version.minor)"], :libgeos_cpp)
]

# Dependencies that must be installed before this package can be built
dependencies = []

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"6")

max_stars_repo_name: jameskermode/Yggdrasil

max_issues_repo_name: jameskermode/Yggdrasil

max_forks_repo_name: jameskermode/Yggdrasil


text: # deprecated methods


text:
module Julia

using ..Mattermost

using Latexify
using Random

function inject_module(request)
    parsed = "begin " * request * " end" |> Meta.parse

    func_expr = :(function execute() end)
    func_body = func_expr.args[2]
    func_body.args = [e for e in parsed.args if !isa(e, Expr) || e.head != :using]

    module_symbol = Random.randstring('A':'Z', 20) |> Symbol
    module_expr = :(module $module_symbol end)
    module_body = module_expr.args[3]
    module_body.args = [e for e in parsed.args if isa(e, Expr) && e.head == :using]
    if isempty(module_body.args)
        push!(module_body.args, :(using Nemo))
    end
    push!(module_body.args, func_expr)

    module_expr |> Base.eval

    return module_symbol
end

function render(answer)
    if !occursin('^', answer) && !occursin('_', answer) && !occursin('\\', answer)
        return occursin('\n', answer) ? "```\n$answer\n```" : "`$answer`"
    end

    try
        response = replace(answer, "//" => "/") |> latexify
        response = replace(response, r"^[^$]*[$]+" => "```latex\n")
        return     replace(response, r"[$]+[^$]*$" => "\n```")
    catch ex
        return "`$answer`"
    end
end

function julia(req)
    request = replace(req.text, "!julia " => "")
    request = strip(request, ['`', ' '])

    local output
    try
        module_symbol = inject_module(request)
        answer = @eval Base $module_symbol.execute() |> string
        output = answer |> render
    catch ex
        output = "```\n" * sprint(showerror, ex) * "\n```"
    end

    return OutgoingWebhookResponse(output)
end

end


text:
function one_var_test(mdl_gen::Function)
    n_vars = 1
    data_dist = Beta(2, 4)
    train_data = let n=Int64(typemax(Int8))
        data = rand(data_dist, 1, n)
        data = collect(data')
        data = DataFrame(data, :auto)
    end
    train_pred_pdf = let data=train_data, mdl=mdl_gen(n_vars, data_dist)
        mach = machine(mdl, data)
        fit!(mach)
        pred_pdf = MLJBase.transform(mach, data)
    end
    train_pred_pdf
end

function multi_var_test(mdl_gen::Function; n_vars::Int64=2)
    data_dist = Dirichlet(n_vars, 4)
    train_data = let n=Int64(typemax(Int8))
        data = rand(data_dist, n)
        data = collect(data')
        data = DataFrame(data, :auto)
    end
    train_pred_pdf = let data=train_data, mdl=mdl_gen(n_vars, data_dist)
        mach = machine(mdl, data)
        fit!(mach)
        pred_pdf = MLJBase.transform(mach, data)
    end
    train_pred_pdf
end


text:
#####
##### Shortcut for truncating discrete uniform distributions.
#####

function truncated(d::DiscreteUniform, l::T, u::T) where {T <: Real}
    a = ceil(Int, max(l, d.a))
    b = floor(Int, min(u, d.b))
    return DiscreteUniform(a, b)
end
function truncated(d::DiscreteUniform, l::Real, ::Nothing)
    return DiscreteUniform(ceil(Int, max(l, d.a)), d.b)
end
function truncated(d::DiscreteUniform, ::Nothing, u::Real)
    return DiscreteUniform(d.a, floor(Int, min(u, d.b)))
end


text:
module EnergyModels

# using Requires
using CSV
using Destruct
using JuMP
using AxisArrays
using LightGraphs
using MetaGraphs
using DataFrames
using Logging
using SparseArrays

import PowerModels
const PM = PowerModels

import MathOptInterface
const MOI = MathOptInterface

using Base.Iterators: flatten

# using Memento

# # Create our module level logger (this will get precompiled)
# const logger = getlogger(@__MODULE__)

# # Register the module level logger at runtime so that folks can access the logger via `get_logger(MyModule)`
# # NOTE: If this line is not included then the precompiled `MyModule.LOGGER` won't be registered at runtime.
# function __init__()
#     Memento.register(logger)
# end

function __init__()
    # @require TimeSeries="9e3dc215-6440-5c97-bce1-76c03772f85e" nothing
    # @require PowerSystems="bcd98974-b02a-5e2f-9ee0-a103f5c450dd" include("data/powersystems.jl")
    # @require PyCall="438e738f-606a-5dbb-bf0a-cddfbfd45ab0" include("data/pypsanetwork.jl")
end

include("abstracttypes.jl")
include("core.jl")

include("formulation.jl")
include("compat.jl")
include("macros.jl")
include("modelview.jl")
include("wrappedarray.jl")
include("registry.jl")
include("graph.jl")
include("containerviews.jl")

include("components/components.jl")
include("data/data.jl")

export add!, addto!, build!, optimize!, store_results!, set_snapshots!, devices,
    subnetworks, buses, push!, axis, graph, determine_subnetworks!, jumpmodel,
    get, getjump, getvalue, getdual, getparam

# Components and Devices
export EnergyModel, SubNetwork, Device, Bus, Line, Transformer, Link,
    Load, Generator, StorageUnit, Store, Branch, PassiveBranch, ActiveBranch,
    OnePort

# TODO Generate a precompile file with SnoopCompiler

end # module

max_stars_repo_name: coroa/EnergyModels

max_issues_repo_name: coroa/EnergyModels

max_forks_repo_name: coroa/EnergyModels


text:
Base.length(ms::ModelingStruct) = length(_data(ms))

Base.size(ms::ModelingStruct) = size(_data(ms))

Base.propertynames(ms::ModelingStruct{T,V,K}) where {T,V,K} = K

max_stars_repo_name: jonniedie/NamedViewVectors


text:
using ACEtb
using Test

@testset "ACEtb.jl" begin
    # Write your tests here.

    include("test_bond1p.jl")

    # SlaterKoster tests
    include("test_basics.jl")
    include("test_sk.jl")
    #include("test_kwon.jl")
end


text:
### A Pluto.jl notebook ###
# v0.17.5

using Markdown
using InteractiveUtils

# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
    quote
        local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
        local el = $(esc(element))
        global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
        el
    end
end

# ╔═╡ ecc81850-8d79-4b6f-83c8-f2c9bcda23b3
using ProgressLogging

# ╔═╡ eebe1108-588a-4e81-a69c-f2c21e9cbbaa
using PlutoUI

# ╔═╡ 890b8d1d-1bf0-4497-ac64-9852f68e1577
using Plots

# ╔═╡ 24c5d164-b618-4e05-abe9-62d129c0b55f
md"""
# Progress
"""

# ╔═╡ 2e7dac1a-ef0d-4b76-a33a-9510b064c25c
@progress for z in 1:1000
	sleep(.001)
end

# ╔═╡ 3599eb82-0003-11eb-3814-dfd0f5737846
for i in 1:1000

	@debug i
	@info i*100

	if isodd(i)
		@warn "Oh no!" i i+1
	end
end

# ╔═╡ 54d5c34e-63b5-4b52-91fe-a5fd1b729182
for z in 1:20
	@info z
	sleep(.1)
end

# ╔═╡ 0248c2de-7edf-4ff6-a450-9f6d79f8966d
@warn "wow"

# ╔═╡ 196080df-e8c0-4120-a97c-443cf66295ff
md"""
# Positioning
"""

# ╔═╡ a22411c8-24e0-4a80-9b91-bc1f0999cc3c
Dict([1,"asdf"] => (123, [1,[2,3,[4,5, md"# asdf"]]], md"## asdf", DomainError("asdf")))

# ╔═╡ dd183c9d-c070-43bc-95ff-cf64ba27071e

# ╔═╡ 5f8496cb-d29e-4c4c-b378-1173242c7a78
collect(rand(1000))

# ╔═╡ a93ac790-7a04-418d-8117-01f01e4608c8
:asdf  => 123

# ╔═╡ 88f87c39-89ef-4492-92ae-c6cd33699c59
let
	@info "a asdf   as"
	123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123
	@info "b"
	@info "c"
end

# ╔═╡ 2d01cdaa-fffe-11ea-09f5-63527a1b0f87
@bind x TextField(default="asdfassdf")

# ╔═╡ 2883b3d8-fffe-11ea-0a0f-bbd85ec665ea
begin

	try
		sqrt(-1)
	catch e
		@error "99" exception=(e, catch_backtrace())
	end
end

# ╔═╡ 2fbbb413-213f-4556-b5f9-df7cf6331451
b = @bind hello Slider(1:100)

# ╔═╡ 449541e2-351d-41d2-9623-34d243fe6a97
b

# ╔═╡ 0e823733-4668-47db-8d17-f079b7ed8c75
hello

# ╔═╡ dfcf652e-ca15-43ad-8307-d40367de6986
@warn "Oh no!" 12

# ╔═╡ 5d023cd2-4fe6-4bd0-9a54-7512f52b7916
begin

	@warn md"""
	_Writing a notebook is not just about writing the final document — Pluto empowers the experiments and discoveries that are essential to getting there._

	**Explore models and share results** in a notebook that is

	-   **_reactive_** - when changing a function or variable, Pluto automatically updates all affected cells.
	-   **_lightweight_** - Pluto is written in pure Julia and is easy to install.
	-   **_simple_** - no hidden workspace state; friendly UI.
	"""
end

# ╔═╡ e5f2703b-198c-4926-867e-7f914fa10253
md"""
# Rich output in logs
"""

# ╔═╡ b52f7e61-c6b5-46ae-8025-d2b4649fed99
svg_data = download("https://diffeq.sciml.ai/stable/assets/multiODEplot.png") |> read

# ╔═╡ 52b8c0be-64f7-4950-ab4a-983c6fa50d1a
cool_plot = Show(MIME"image/png"(), svg_data)

# ╔═╡ 091d33fe-fffe-11ea-131f-01f4248b30ea
begin
	@info "23dafs lkjlkjsadf lkj asdflkj asdlkfj alskdjflkasdjflkjasdlfk jsdlkjf sdlkjf   laskjdf lkasdjflkajs df   lkjas dflkjasdlfkjsadf

	asdf" x [x,x,cool_plot,x]

	@error "asfdasdf"

end

# ╔═╡ 504dfdc1-41da-4fcb-ba8e-aa69643d57a1
plot(args...; kwargs...) = Plots.plot(args...; kwargs..., size=(150,120)) |> as_svg

# ╔═╡ 6a7824d0-06e4-4569-9fa8-b9884d299f80
begin

	simulation_data = [1,2,23,2,3]

	@info plot(simulation_data)

end

# ╔═╡ 7c7b11a2-69cf-4cd5-b9e5-f2517211579f
md"""
# @bind in logs
"""

# ╔═╡ d48fb1c0-b88a-4a23-8a87-7fdcd74bf3cc
begin

	@info @bind wow Slider(1:100)

end

# ╔═╡ 6355afae-d4ad-40f4-9917-3f228a63ddaa
t = collect(1:wow)

# ╔═╡ 70fc79bb-6118-4a0d-ac6e-fbdf1ba9722a
let
	result = sin.(t)
	@info plot(t, result)

	result
end

# ╔═╡ d1a1bca1-d01a-4722-8bd9-b759b8ef72d4
md"""
# External logs
"""

# ╔═╡ 4ca5f24f-3139-4dee-a28a-007c936c7363
md"""
### Function defined in another cell:
"""

# ╔═╡ 25bca319-2b63-4013-88be-7607eff3630f
function f(x)

	@warn "x might be too large!" x
end

# ╔═╡ 2ade9e4d-11cc-47ae-aaa6-76864757bd21
f(123)

# ╔═╡ 37108eb9-77db-49fa-b168-f9c1c25955fa
md"""
### Function defined in another file:
"""

# ╔═╡ 0bf3e7bd-1da7-441a-9807-6c9473944048
external_src = let
	f = tempname()
	code = """
	function g(x)

		@warn "x might be too large!" x
	end
	"""
	write(f, code)
	f
end

# ╔═╡ cd6c50f6-16d6-4a07-8f20-7450392cd643
function ingredients(path::String)
	# this is from the Julia source code (evalfile in base/loading.jl)
	# but with the modification that it returns the module instead of the last object
	name = Symbol(basename(path))
	m = Module(name)
	Core.eval(m,
        Expr(:toplevel,
             :(eval(x) = $(Expr(:core, :eval))($name, x)),
             :(include(x) = $(Expr(:top, :include))($name, x)),
             :(include(mapexpr::Function, x) = $(Expr(:top, :include))(mapexpr, $name, x)),
             :(include($path))))
	m
end

# ╔═╡ 9cc753a0-f8be-4045-a432-295a05388a4a
m = ingredients(external_src)

# ╔═╡ 1a088b03-ac41-440b-8c82-bd5760590665
m.g(123)

# ╔═╡ 0c9de395-19a9-4ec3-a918-ea3f9835ef18

# ╔═╡ 091d33fe-fffe-11ea-131f-01f4248b30ea
@info "23aaa"

# ╔═╡ e35e35f4-71c8-4f3b-8c72-4b3ffe4766a3
@info collect(1:100)

# ╔═╡ 2d01cdaa-fffe-11ea-09f5-63527a1b0f87
x = 233564653

# ╔═╡ c50f7178-8c7d-4319-82d9-b9154e8892d9
for x in 1:20
	@info "This is too long."
end

# ╔═╡ e5a8e7bd-5734-4254-914d-6f87670bf7d4
@bind wow html"<input type=checkbox>"

# ╔═╡ 2883b3d8-fffe-11ea-0a0f-bbd85ec665ea
begin

	wow && @info "a"
	wow && @info "b"
	wow && @info "c"
	wow && @info "d"

	try
		sqrt(-1)
	catch e
		@error "99" exception=(e, catch_backtrace())
	end
	nothing
end

# ╔═╡ 786b7146-8eab-4390-a746-3ccf25d1c4c8
for i in 1:10
	@info i
	@debug i
	sleep(.05)
end

# ╔═╡ 3599eb82-0003-11eb-3814-dfd0f5737846
for i in 1:10

	@debug i
	@info i*100
	if isodd(i)
		@warn "Oh no!" i
		@error i
	end
	sleep(.1)
end

# ╔═╡ f6147e0c-796f-4f5d-b000-93d790683a54
@info md"# hello"

# ╔═╡ f017b4d5-38ac-4498-8e58-770337a0d17d
md"""

# Hello

I am a footnote $(@info("Inside text!")), how cool is that!

But im not working :(
"""

# ╔═╡ edde2e33-9b83-4502-85d6-13c947589f55
md"# Logging"

# ╔═╡ e68681b0-df0c-4b4d-8304-d600d511cc74
function f(x,y)
	sin(3*sqrt(x^2 + y^2)) < 0.0
end

# ╔═╡ 988f6343-c1b2-41e2-a3f0-b5eb6653087a
md"""
![](https://cdn.vox-cdn.com/thumbor/sgjCRJzWvyufDoVKCPKPrsyhZoA=/1400x0/filters:no_upscale()/cdn.vox-cdn.com/uploads/chorus_asset/file/10161377/iprimus_180205_2248_0003.jpg)
"""

# ╔═╡ c07a9c5f-3807-431f-a020-8eb127a226dc
begin
	println("Here is some ascii art!")
	println()

	@time for y in LinRange(5,-5,21)
		for x in LinRange(-5,5,40)
			print(f(x,y) ? "X" : " ")
		end
		println()
	end
end

# ╔═╡ eb26cb00-1196-41a7-8e81-92641aa8dbd7
run(`ls -lha $(first(DEPOT_PATH))`)

# ╔═╡ 9e27dc8c-0a18-4adb-b3b1-9bdd315caaa9
with_terminal() do
	println(123)
end

# ╔═╡ 755e37af-0f21-4612-8c4c-cc294048b527
for p in readdir(first(DEPOT_PATH))
	print(p)
	print("/")
	print("\t\t")
	print("(", Base.format_bytes(rand(1:10_000_000)), ")")
	println()
	print("  ")
	print()
	println()
end

# ╔═╡ 51f4dc20-7cf6-4f08-b500-0c71f6ac01b7

# ╔═╡ 94380ba8-247b-4e9c-9c6b-a40b04e2bcfb
import FileTrees

# ╔═╡ 7dcf9a68-4a73-4301-a1ed-39963309d028
t = FileTrees.FileTree(joinpath(first(DEPOT_PATH), "environments"))

# ╔═╡ 7a9c4221-27c7-4195-9946-3a7190dfb07f
FileTrees.load(t) do z
	rand()
end

# ╔═╡ 1ea9e96a-ce26-4807-9d80-114638a3952b
FileTrees.children(t)

# ╔═╡ 05461fd2-a7ce-4ed7-a622-102242547874
import Logging

# ╔═╡ 3cbaa462-5714-4d7c-83e3-a957763b8d91
begin
	print(123)
	@info 123
	@info 123
end

# ╔═╡ 1e49c42a-364e-47eb-85d9-42e73fdc2371
Logging.@logmsg Logging.LogLevel(-10) "asdf"

# ╔═╡ 13c5ce42-4eee-480b-b490-c40ef4bc8cb5
Logging.@logmsg Logging.LogLevel(-100) "asdf"

# ╔═╡ b38ae226-0a6c-49e3-b55d-ebdbf0652842
Logging.@logmsg Logging.LogLevel(-555) "asdf"

# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"

[compat]
Plots = "~1.22.6"
PlutoUI = "~0.7.16"
ProgressLogging = "~0.1.4"
"""

# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised

[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "84918055d15b3114ede17ac6a7182f68870c16f7"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.1"

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+0"

[[Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+1"

[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "8d954297bc51cc64f15937c2093799c3617b73e4"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.10.0"

[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "a851fec56cb73cfdf43762999ec72eff5b86882a"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.15.0"

[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.0"

[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "31d0151f5716b655421d9d75b7fa74cc4e744df2"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.39.0"

[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"

[[Contour]]
deps = ["StaticArrays"]
git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.5.7"

[[DataAPI]]
git-tree-sha1 = "cc70b17275652eb47bc9e5f81635981f13cea5c8"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.9.0"

[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "7d9d316f04214f7efdbb6398d545446e246eff02"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.10"

[[DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.5"

[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[EarCut_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d"
uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5"
version = "2.2.3+0"

[[Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b3bfd02e98aedfa5cf885665493c5598c350cd2f"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.2.10+0"

[[FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"

[[FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "d8a578692e3077ac998b50c0217dfd67f21d1e5f"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.0+0"

[[FixedPointNumbers]]
deps = ["Statistics"]
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.4"

[[Fontconfig_jll]]
deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03"
uuid = "a3f928ae-7b40-5064-980b-68af3947d34b"
version = "2.13.93+0"

[[Formatting]]
deps = ["Printf"]
git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8"
uuid = "59287772-0a20-5a39-b81b-1366585eb4c0"
version = "0.4.2"

[[FreeType2_jll]]
deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9"
uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7"
version = "2.10.4+0"

[[FriBidi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91"
uuid = "559328eb-81f9-559d-9380-de523a88c83c"
version = "1.0.10+0"

[[GLFW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"]
git-tree-sha1 = "0c603255764a1fa0b61752d2bec14cfbd18f7fe8"
uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"
version = "3.3.5+1"

[[GR]]
deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "Serialization", "Sockets", "Test", "UUIDs"]
git-tree-sha1 = "d189c6d2004f63fd3c91748c458b09f26de0efaa"
uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
version = "0.61.0"

[[GR_jll]]
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "cafe0823979a5c9bff86224b3b8de29ea5a44b2e"
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
version = "0.61.0+0"

[[GeometryBasics]]
deps = ["EarCut_jll", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"]
git-tree-sha1 = "58bcdf5ebc057b085e58d95c138725628dd7453c"
uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
version = "0.4.1"

[[Gettext_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"]
git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046"
uuid = "78b55507-aeef-58d4-861c-77aaff3498b1"
version = "0.21.0+0"

[[Glib_jll]]
deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06"
uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
version = "2.68.3+2"

[[Graphite2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011"
uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472"
version = "1.3.14+0"

[[Grisu]]
git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2"
uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe"
version = "1.0.2"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
git-tree-sha1 = "14eece7a3308b4d8be910e265c724a6ba51a9798"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.16"

[[HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3"
uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566"
version = "2.8.1+1"

[[Hyperscript]]
deps = ["Test"]
git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9"
uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91"
version = "0.0.4"

[[HypertextLiteral]]
git-tree-sha1 = "f6532909bf3d40b308a0f360b6a0e626c0e263a8"
uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2"
version = "0.9.1"

[[IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.2"

[[IniFile]]
deps = ["Test"]
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[IrrationalConstants]]
git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151"
uuid = "92d709cd-6900-40b7-9082-c6be49f344b6"
version = "0.1.1"

[[IterTools]]
git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18"
uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
version = "1.3.0"

[[IteratorInterfaceExtensions]]
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.3.0"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.2"

[[JpegTurbo_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d735490ac75c5cb9f1b00d8b5509c11984dc6943"
uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8"
version = "2.1.0+0"

[[LAME_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c"
uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d"
version = "3.100.1+0"

[[LZO_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6"
uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac"
version = "2.10.1+0"

[[LaTeXStrings]]
git-tree-sha1 = "c7f1c695e06c01b95a67f0cd1d34994f3e7db104"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.2.1"

[[Latexify]]
deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"]
git-tree-sha1 = "a4b12a1bd2ebade87891ab7e36fdbce582301a92"
uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
version = "0.15.6"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"

[[LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"

[[LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Libffi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290"
uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490"
version = "3.2.2+1"

[[Libgcrypt_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"]
git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae"
uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4"
version = "1.8.7+0"

[[Libglvnd_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"]
git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf"
uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29"
version = "1.3.0+3"

[[Libgpg_error_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9"
uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8"
version = "1.42.0+0"

[[Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.1+1"

[[Libmount_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73"
uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9"
version = "2.35.0+0"

[[Libtiff_jll]]
deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "340e257aada13f95f98ee352d316c3bed37c8ab9"
uuid = "89763e89-9b03-5906-acba-b20f662cd828"
version = "4.3.0+0"

[[Libuuid_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066"
uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700"
version = "2.36.0+0"

[[LinearAlgebra]]
deps = ["Libdl", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[LogExpFunctions]]
deps = ["ChainRulesCore", "DocStringExtensions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "34dc30f868e368f8a17b728a1238f3fcda43931a"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.3.3"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "5a5bc6bf062f0f95e62d0fe0a2d99699fed82dd9"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.8"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.0.3"

[[MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[Measures]]
git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f"
uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
version = "0.3.1"

[[Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.0.2"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"

[[NaNMath]]
git-tree-sha1 = "bfe47e760d60b82b66b61d2d44128b62e3a369fb"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.5"

[[NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[Ogg_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f"
uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051"
version = "1.3.5+1"

[[OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"

[[OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "15003dcb7d8db3c6c857fda14891a539a8f2705a"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "1.1.10+0"

[[Opus_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720"
uuid = "91d4177d-7536-5919-b921-800302f37372"
version = "1.3.2+0"

[[OrderedCollections]]
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"

[[PCRE_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc"
version = "8.44.0+0"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "98f59ff3639b3d9485a03a72f3ab35bab9465720"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.0.6"

[[Pixman_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29"
uuid = "30392449-352a-5448-841d-b1acce4e97dc"
version = "0.40.1+0"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[PlotThemes]]
deps = ["PlotUtils", "Requires", "Statistics"]
git-tree-sha1 = "a3a964ce9dc7898193536002a6dd892b1b5a6f1d"
uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
version = "2.0.1"

[[PlotUtils]]
deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"]
git-tree-sha1 = "b084324b4af5a438cd63619fd006614b3b20b87b"
uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
version = "1.0.15"

[[Plots]]
deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs"]
git-tree-sha1 = "ba43b248a1f04a9667ca4a9f782321d9211aa68e"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
version = "1.22.6"

[[PlutoUI]]
deps = ["Base64", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"]
git-tree-sha1 = "4c8a7d080daca18545c56f1cac28710c362478f3"
uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
version = "0.7.16"

[[Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.2.2"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[ProgressLogging]]
deps = ["Logging", "SHA", "UUIDs"]
git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539"
uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
version = "0.1.4"

[[Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "ad368663a5e20dbb8d6dc2fddeefe4dae0781ae8"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+0"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["SHA", "Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[RecipesBase]]
git-tree-sha1 = "44a75aa7a527910ee3d1751d1f0e4148698add9e"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "1.1.2"

[[RecipesPipeline]]
deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"]
git-tree-sha1 = "7ad0dfa8d03b7bcf8c597f59f5292801730c55b8"
uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c"
version = "0.4.1"

[[Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.2.2"

[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.1.3"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Scratch]]
deps = ["Dates"]
git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda"
uuid = "6c6a2e73-6563-6170-7368-637461726353"
version = "1.1.0"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Showoff]]
deps = ["Dates", "Grisu"]
git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de"
uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
version = "1.0.3"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.0.1"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "3c76dde64d03699e074ac02eb2e8ba8254d428da"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.2.13"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StatsAPI]]
git-tree-sha1 = "1958272568dc176a1d881acb797beb909c785510"
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
version = "1.0.0"

[[StatsBase]]
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "eb35dcc66558b2dda84079b9a1be17557d32091a"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.33.12"

[[StructArrays]]
deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"]
git-tree-sha1 = "2ce41e0d042c60ecd131e9fb7154a3bfadbf50d3"
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.6.3"

[[TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.1"

[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
git-tree-sha1 = "fed34d0e71b91734bf0a7e10eb1bb05296ddbcd0"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.6.0"

[[Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[URIs]]
git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355"
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
version = "1.3.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[Wayland_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"]
git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23"
uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89"
version = "1.19.0+0"

[[Wayland_protocols_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll"]
git-tree-sha1 = "2839f1c1296940218e35df0bbb220f2a79686670"
uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91"
version = "1.18.0+4"

[[XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.9.12+0"

[[XSLT_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"]
git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a"
uuid = "aed1982a-8fda-507f-9586-7b0439959a61"
version = "1.1.34+0"

[[Xorg_libX11_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"]
git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527"
uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc"
version = "1.6.9+4"

[[Xorg_libXau_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e"
uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec"
version = "1.0.9+4"

[[Xorg_libXcursor_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"]
git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd"
uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724"
version = "1.2.0+4"

[[Xorg_libXdmcp_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4"
uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05"
version = "1.1.3+4"

[[Xorg_libXext_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3"
uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3"
version = "1.3.4+4"

[[Xorg_libXfixes_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4"
uuid = "d091e8ba-531a-589c-9de9-94069b037ed8"
version = "5.0.3+4"

[[Xorg_libXi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"]
git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246"
uuid = "a51aa0fd-4e3c-5386-b890-e753decda492"
version = "1.7.10+4"

[[Xorg_libXinerama_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"]
git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123"
uuid = "d1454406-59df-5ea1-beac-c340f2130bc3"
version = "1.1.4+4"

[[Xorg_libXrandr_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"]
git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631"
uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484"
version = "1.5.2+4"

[[Xorg_libXrender_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96"
uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa"
version = "0.9.10+4"

[[Xorg_libpthread_stubs_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb"
uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74"
version = "0.1.0+3"

[[Xorg_libxcb_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"]
git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6"
uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b"
version = "1.13.0+3"

[[Xorg_libxkbfile_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"]
git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2"
uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a"
version = "1.1.0+4"

[[Xorg_xcb_util_image_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97"
uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b"
version = "0.4.0+1"

[[Xorg_xcb_util_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"]
git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1"
uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5"
version = "0.4.0+1"

[[Xorg_xcb_util_keysyms_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00"
uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7"
version = "0.4.0+1"

[[Xorg_xcb_util_renderutil_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e"
uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e"
version = "0.3.9+1"

[[Xorg_xcb_util_wm_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"]
git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67"
uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361"
version = "0.4.1+1"

[[Xorg_xkbcomp_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"]
git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b"
uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4"
version = "1.4.2+4"

[[Xorg_xkeyboard_config_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"]
git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d"
uuid = "33bec58e-1273-512f-9401-5d533626f822"
version = "2.27.0+4"

[[Xorg_xtrans_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845"
uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10"
version = "1.4.0+3"

[[Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[Zstd_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "cc4bf3fdde8b7e3e9fa0351bdeedba1cf3b7f6e6"
uuid = "3161d3a3-bdf6-5164-811a-617609db77b4"
version = "1.5.0+0"

[[libass_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47"
uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0"
version = "0.15.1+0"

[[libblastrampoline_jll]]
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"

[[libfdk_aac_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55"
uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280"
version = "2.0.2+0"

[[libpng_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c"
uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f"
version = "1.6.38+0"

[[libvorbis_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"]
git-tree-sha1 = "c45f4e40e7aafe9d086379e5578947ec8b95a8fb"
uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a"
version = "1.3.7+0"

[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

[[x264_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2"
uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a"
version = "2021.5.5+0"

[[x265_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9"
uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76"
version = "3.5.0+0"

[[xkbcommon_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"]
git-tree-sha1 = "ece2350174195bb31de1a63bea3a41ae1aa593b6"
uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd"
version = "0.9.1+5"
"""

# ╔═╡ Cell order:
# ╠═24c5d164-b618-4e05-abe9-62d129c0b55f
# ╠═ecc81850-8d79-4b6f-83c8-f2c9bcda23b3
# ╠═2e7dac1a-ef0d-4b76-a33a-9510b064c25c
# ╠═3599eb82-0003-11eb-3814-dfd0f5737846
# ╠═eebe1108-588a-4e81-a69c-f2c21e9cbbaa
# ╠═54d5c34e-63b5-4b52-91fe-a5fd1b729182
# ╠═0248c2de-7edf-4ff6-a450-9f6d79f8966d
# ╟─196080df-e8c0-4120-a97c-443cf66295ff
# ╠═a22411c8-24e0-4a80-9b91-bc1f0999cc3c
# ╠═091d33fe-fffe-11ea-131f-01f4248b30ea
# ╠═dd183c9d-c070-43bc-95ff-cf64ba27071e
# ╠═5f8496cb-d29e-4c4c-b378-1173242c7a78
# ╠═a93ac790-7a04-418d-8117-01f01e4608c8
# ╟─88f87c39-89ef-4492-92ae-c6cd33699c59
# ╠═2d01cdaa-fffe-11ea-09f5-63527a1b0f87
# ╠═2883b3d8-fffe-11ea-0a0f-bbd85ec665ea
# ╠═2fbbb413-213f-4556-b5f9-df7cf6331451
# ╠═449541e2-351d-41d2-9623-34d243fe6a97
# ╠═0e823733-4668-47db-8d17-f079b7ed8c75
# ╠═dfcf652e-ca15-43ad-8307-d40367de6986
# ╠═5d023cd2-4fe6-4bd0-9a54-7512f52b7916
# ╟─e5f2703b-198c-4926-867e-7f914fa10253
# ╠═b52f7e61-c6b5-46ae-8025-d2b4649fed99
# ╠═52b8c0be-64f7-4950-ab4a-983c6fa50d1a
# ╠═504dfdc1-41da-4fcb-ba8e-aa69643d57a1
# ╠═6a7824d0-06e4-4569-9fa8-b9884d299f80
# ╟─7c7b11a2-69cf-4cd5-b9e5-f2517211579f
# ╠═d48fb1c0-b88a-4a23-8a87-7fdcd74bf3cc
# ╠═890b8d1d-1bf0-4497-ac64-9852f68e1577
# ╠═6355afae-d4ad-40f4-9917-3f228a63ddaa
# ╠═70fc79bb-6118-4a0d-ac6e-fbdf1ba9722a
# ╟─d1a1bca1-d01a-4722-8bd9-b759b8ef72d4
# ╟─4ca5f24f-3139-4dee-a28a-007c936c7363
# ╠═25bca319-2b63-4013-88be-7607eff3630f
# ╠═2ade9e4d-11cc-47ae-aaa6-76864757bd21
# ╟─37108eb9-77db-49fa-b168-f9c1c25955fa
# ╠═0bf3e7bd-1da7-441a-9807-6c9473944048
# ╟─cd6c50f6-16d6-4a07-8f20-7450392cd643
# ╠═9cc753a0-f8be-4045-a432-295a05388a4a
# ╠═1a088b03-ac41-440b-8c82-bd5760590665
# ╠═0c9de395-19a9-4ec3-a918-ea3f9835ef18
# ╟─00000000-0000-0000-0000-000000000001
# ╟─00000000-0000-0000-0000-000000000002


text:
#== # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Description
#
#   Tests related to IAU-2006 transformations.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# References
#
#   [1] Vallado, D. A (2013). Fundamentals of Astrodynamics and Applications.
#       Microcosm Press, Hawthorn, CA, USA.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ==#

# File: ./src/transformations/iau2006/iau2006.jl
# ==============================================

# Functions rITRFtoTIRS_iau2006 and rTIRStoITRF_iau2006
# -----------------------------------------------------

################################################################################
#                                 Test Results
################################################################################
#
# Scenario 01
# ===========
#
# Example 3-14: Performing an IAU-2000 reduction [1, p. 220]
#
# According to this example and Table 3-6, using:
#
#   JD_TT  = 2453101.828154745
#   x_p    = -0.140682"
#   y_p    = +0.333309"
#   r_itrf = -1033.4793830    i + 7901.2952754    j + 6380.3565958    k [km]
#   v_itrf =    -3.225636520  i -    2.872451450  j +    5.531924446  k [km/s]
#
# one gets the following:
#
#   r_tirs  = -1033.47503120   i + 7901.30558560   j + 6380.34453270   k [km]
#   v_tirs  =    -3.2256327470 i -    2.8724425110 j +    5.5319312880 k [km/s]
#
################################################################################

@testset "Function rITRFtoTIRS_iau2006 and rTIRStoITRF_iau2006" begin
    JD_TT = 2453101.828154745
    x_p   = -0.140682*pi/(180*3600)
    y_p   = +0.333309*pi/(180*3600)

    ## rITRFtoTIRS_iau2006
    ## ===================

    r_itrf = [-1033.4793830; 7901.2952754; 6380.3565958]
    v_itrf = [-3.225636520; -2.872451450; +5.531924446]

    ## DCM
    ## ---

    D_TIRS_ITRF = rITRFtoTIRS_iau2006(JD_TT, x_p, y_p)

    r_tirs = D_TIRS_ITRF*r_itrf
    v_tirs = D_TIRS_ITRF*v_itrf

    @test r_tirs[1] ≈ -1033.47503120 atol=1e-7
    @test r_tirs[2] ≈ +7901.30558560 atol=1e-7
    @test r_tirs[3] ≈ +6380.34453270 atol=1e-7

    @test v_tirs[1] ≈ -3.2256327470  atol=1e-9
    @test v_tirs[2] ≈ -2.8724425110  atol=1e-9
    @test v_tirs[3] ≈ +5.5319312880  atol=1e-9

    ## Quaternion
    ## ----------

    q_TIRS_ITRF = rITRFtoTIRS_iau2006(Quaternion, JD_TT, x_p, y_p)

    r_tirs = vect(q_TIRS_ITRF\r_itrf*q_TIRS_ITRF)
    v_tirs = vect(q_TIRS_ITRF\v_itrf*q_TIRS_ITRF)

    @test r_tirs[1] ≈ -1033.47503120 atol=1e-7
    @test r_tirs[2] ≈ +7901.30558560 atol=1e-7
    @test r_tirs[3] ≈ +6380.34453270 atol=1e-7

    @test v_tirs[1] ≈ -3.2256327470  atol=1e-9
    @test v_tirs[2] ≈ -2.8724425110  atol=1e-9
    @test v_tirs[3] ≈ +5.5319312880  atol=1e-9

    ## rTIRStoITRF_iau2006
    ## ==============

    r_tirs  = [-1033.47503120; 7901.30558560; 6380.34453270]
    v_tirs  = [-3.2256327470; -2.8724425110; +5.5319312880]

    ## DCM
    ## ---

    D_ITRF_TIRS = rTIRStoITRF_iau2006(JD_TT, x_p, y_p)
    r_itrf = D_ITRF_TIRS*r_tirs
    v_itrf = D_ITRF_TIRS*v_tirs

    @test r_itrf[1] ≈ -1033.4793830 atol=1e-7
    @test r_itrf[2] ≈ +7901.2952754 atol=1e-7
    @test r_itrf[3] ≈ +6380.3565958 atol=1e-7

    @test v_itrf[1] ≈ -3.225636520  atol=1e-9
    @test v_itrf[2] ≈ -2.872451450  atol=1e-9
    @test v_itrf[3] ≈ +5.531924446  atol=1e-9

    ## Quaternion
    ## ----------

    q_ITRF_TIRS = rTIRStoITRF_iau2006(Quaternion, JD_TT, x_p, y_p)
    r_itrf = vect(q_ITRF_TIRS\r_tirs*q_ITRF_TIRS)
    v_itrf = vect(q_ITRF_TIRS\v_tirs*q_ITRF_TIRS)

    @test r_itrf[1] ≈ -1033.4793830 atol=1e-7
    @test r_itrf[2] ≈ +7901.2952754 atol=1e-7
    @test r_itrf[3] ≈ +6380.3565958 atol=1e-7

    @test v_itrf[1] ≈ -3.225636520  atol=1e-9
    @test v_itrf[2] ≈ -2.872451450  atol=1e-9
    @test v_itrf[3] ≈ +5.531924446  atol=1e-9
end

# Functions rTIRStoCIRS_iau2006 and rCIRStoTIRS_iau2006
# -----------------------------------------------------

################################################################################
#                                 Test Results
################################################################################
#
# Scenario 01
# ===========
#
# Example 3-14: Performing an IAU-2000 reduction [1, p. 220]
#
# According to this example and Table 3-6, using:
#
#   JD_UT1 = 2453101.827406783
#   LOD    = 0.0015563 s
#   r_tirs = -1033.47503120   i + 7901.30558560   j + 6380.34453270   k [km]
#   v_tirs =    -3.2256327470 i -    2.8724425110 j +    5.5319312880 k [km/s]
#
# one gets the following:
#
#   r_cirs = -5100.01840470   i + 6122.78636480   j + 6380.34453270   k [km]
#   v_cirs =    -4.7453803300 i -    0.7903414530 j +    5.5319312880 k [km/s]
#
################################################################################

@testset "Functions rTIRStoCIRS_iau2006 and rCIRStoTIRS_iau2006" begin
    JD_UT1 = 2453101.827406783
    LOD    = 0.0015563
    w      = 7.292115146706979e-5*(1-LOD/86400)

    # rTIRStoCIRS_iau2006
    # ===================

    r_tirs  = [-1033.47503120; 7901.30558560; 6380.34453270]
    v_tirs  = [-3.2256327470; -2.8724425110; +5.5319312880]

    # DCM
    # ---

    D_CIRS_TIRS = rTIRStoCIRS_iau2006(JD_UT1)

    r_cirs = D_CIRS_TIRS*r_tirs
    v_cirs = D_CIRS_TIRS*(v_tirs + [0;0;w] × r_tirs)

    @test r_cirs[1] ≈ +5100.01840470 atol=1e-7
    @test r_cirs[2] ≈ +6122.78636480 atol=1e-7
    @test r_cirs[3] ≈ +6380.34453270 atol=1e-7

    @test v_cirs[1] ≈ -4.7453803300  atol=1e-9
    @test v_cirs[2] ≈ +0.7903414530  atol=1e-9
    @test v_cirs[3] ≈ +5.5319312880  atol=1e-9

    # Quaternion
    # ----------

    q_CIRS_TIRS = rTIRStoCIRS_iau2006(Quaternion, JD_UT1)

    r_cirs = vect(q_CIRS_TIRS\r_tirs*q_CIRS_TIRS)
    v_cirs = vect(q_CIRS_TIRS\(v_tirs + [0;0;w] × r_tirs)*q_CIRS_TIRS)

    @test r_cirs[1] ≈ +5100.01840470 atol=1e-7
    @test r_cirs[2] ≈ +6122.78636480 atol=1e-7
    @test r_cirs[3] ≈ +6380.34453270 atol=1e-7

    @test v_cirs[1] ≈ -4.7453803300  atol=1e-9
    @test v_cirs[2] ≈ +0.7903414530  atol=1e-9
    @test v_cirs[3] ≈ +5.5319312880  atol=1e-9

    # rCIRStoTIRS_iau2006
    # ===================

    r_cirs = [+5100.01840470; +6122.78636480; +6380.34453270]
    v_cirs = [-4.7453803300; +0.7903414530; +5.5319312880]

    # DCM
    # ---

    D_TIRS_CIRS = rCIRStoTIRS_iau2006(JD_UT1)

    r_tirs = D_TIRS_CIRS*r_cirs
    v_tirs = D_TIRS_CIRS*v_cirs - [0;0;w] × r_tirs

    @test r_tirs[1] ≈ -1033.47503120 atol=1e-7
    @test r_tirs[2] ≈ +7901.30558560 atol=1e-7
    @test r_tirs[3] ≈ +6380.34453270 atol=1e-7

    @test v_tirs[1] ≈ -3.2256327470  atol=1e-9
    @test v_tirs[2] ≈ -2.8724425110  atol=1e-9
    @test v_tirs[3] ≈ +5.5319312880  atol=1e-9

    # Quaternion
    # ----------

    q_TIRS_CIRS = rCIRStoTIRS_iau2006(Quaternion, JD_UT1)

    r_tirs = vect(q_TIRS_CIRS\r_cirs*q_TIRS_CIRS)
    v_tirs = vect(q_TIRS_CIRS\v_cirs*q_TIRS_CIRS) - [0;0;w] × r_tirs

    @test r_tirs[1] ≈ -1033.47503120 atol=1e-7
    @test r_tirs[2] ≈ +7901.30558560 atol=1e-7
    @test r_tirs[3] ≈ +6380.34453270 atol=1e-7

    @test v_tirs[1] ≈ -3.2256327470  atol=1e-9
    @test v_tirs[2] ≈ -2.8724425110  atol=1e-9
    @test v_tirs[3] ≈ +5.5319312880  atol=1e-9
end
#
# Functions rCIRStoGCRF_iau2006 and rGCRFtoCIRS_iau2006
# -----------------------------------------------------

################################################################################
#                                 Test Results
################################################################################
#
# Scenario 01
# ===========
#
# Example 3-14: Performing an IAU-2000 reduction [1, p. 220]
#
# According to this example and Table 3-6, using:
#
# NOTE: It seems that the results in the Example 3-14 is computed **without**
# the `dX` and `dY` corrections, whereas in the Table 3-6 they are computed
# **with** the corrections.
#
#   JD_UT1 = 2453101.827406783
#   dX     = -0.000205"
#   dY     = -0.000136"
#   r_cirs = -5100.01840470   i + 6122.78636480   j + 6380.34453270   k [km]
#   v_cirs =    -4.7453803300 i -    0.7903414530 j +    5.5319312880 k [km/s]
#
# one gets the following (this is the result in Table 3-6):
#
#   r_gcrf = 5102.50895290  i + 6123.01139910 j + 6378.13693380 k [km]
#   v_gcrf =  -4.7432201610 i + 0.7905364950  j + 5.5337557240  k [km/s]
#
################################################################################

@testset "Functions rCIRStoGCRF_iau2006 and rGCRFtoCIRS_iau2006" begin
    JD_TT = 2453101.827406783
    dX    = -0.000205*pi/180/3600
    dY    = -0.000136*pi/180/3600

    # rCIRStoGCRF_iau2006
    # ===================

    r_cirs = [+5100.01840470; +6122.78636480; +6380.34453270]
    v_cirs = [-4.7453803300; +0.7903414530; +5.5319312880]

    # DCM
    # ---

    D_GCRF_CIRS = rCIRStoGCRF_iau2006(JD_TT, dX, dY)
    r_gcrf = D_GCRF_CIRS*r_cirs
    v_gcrf = D_GCRF_CIRS*v_cirs

    @test r_gcrf[1] ≈ +5102.50895290 atol=9e-7
    @test r_gcrf[2] ≈ +6123.01139910 atol=9e-7
    @test r_gcrf[3] ≈ +6378.13693380 atol=9e-7

    @test v_gcrf[1] ≈ -4.7432201610  atol=1e-9
    @test v_gcrf[2] ≈ +0.7905364950  atol=1e-9
    @test v_gcrf[3] ≈ +5.5337557240  atol=1e-9

    # Quaternion
    # ----------

    q_GCRF_CIRS = rCIRStoGCRF_iau2006(Quaternion, JD_TT, dX, dY)

    r_gcrf = vect(q_GCRF_CIRS\r_cirs*q_GCRF_CIRS)
    v_gcrf = vect(q_GCRF_CIRS\v_cirs*q_GCRF_CIRS)

    @test r_gcrf[1] ≈ +5102.50895290 atol=9e-7
    @test r_gcrf[2] ≈ +6123.01139910 atol=9e-7
    @test r_gcrf[3] ≈ +6378.13693380 atol=9e-7

    @test v_gcrf[1] ≈ -4.7432201610  atol=1e-9
    @test v_gcrf[2] ≈ +0.7905364950  atol=1e-9
    @test v_gcrf[3] ≈ +5.5337557240  atol=1e-9

    # Function rGCRFtoCIRS_iau2006
    # ============================

    r_gcrf = [5102.50895290; 6123.01139910; 6378.13693380]
    v_gcrf = [-4.7432201610; 0.7905364950; 5.5337557240]

    # DCM
    # ---

    D_CIRS_GCRF = rGCRFtoCIRS_iau2006(JD_TT, dX, dY)
    r_cirs = D_CIRS_GCRF*r_gcrf
    v_cirs = D_CIRS_GCRF*v_gcrf

    @test r_cirs[1] ≈ +5100.01840470 atol=9e-7
    @test r_cirs[2] ≈ +6122.78636480 atol=9e-7
    @test r_cirs[3] ≈ +6380.34453270 atol=9e-7

    @test v_cirs[1] ≈ -4.7453803300  atol=1e-9
    @test v_cirs[2] ≈ +0.7903414530  atol=1e-9
    @test v_cirs[3] ≈ +5.5319312880  atol=1e-9

    # Quaternion
    # ----------

    q_CIRS_GCRF = rGCRFtoCIRS_iau2006(Quaternion, JD_TT, dX, dY)

    r_cirs = vect(q_CIRS_GCRF\r_gcrf*q_CIRS_GCRF)
    v_cirs = vect(q_CIRS_GCRF\v_gcrf*q_CIRS_GCRF)

    @test r_cirs[1] ≈ +5100.01840470 atol=9e-7
    @test r_cirs[2] ≈ +6122.78636480 atol=9e-7
    @test r_cirs[3] ≈ +6380.34453270 atol=9e-7

    @test v_cirs[1] ≈ -4.7453803300  atol=1e-9
    @test v_cirs[2] ≈ +0.7903414530  atol=1e-9
    @test v_cirs[3] ≈ +5.5319312880  atol=1e-9
end