edenmath.app-1.1.1a/0000755000175000017500000000000010121023424014452 5ustar brentbrent00000000000000edenmath.app-1.1.1a/EMResponder.h0000644000175000017500000000411110063367242017021 0ustar brentbrent00000000000000// // EMResponder.h // EdenMath // // Created by admin on Thu Feb 21 2002. // Copyright (c) 2002-2004 Edenwaith. All rights reserved. // #import #import #ifdef GNUSTEP #define true 1 #endif typedef enum Op_Type { NO_OP = 0, ADD_OP = 1, SUBTRACT_OP = 2, MULTIPLY_OP = 3, DIVIDE_OP = 4, EXPONENT_OP = 5, XROOT_OP = 6, MOD_OP = 7, EE_OP = 8, NPR_OP = 9, NCR_OP = 10 } OpType; typedef enum Angle_Type { DEGREE = 0, RADIAN = 1, GRADIENT = 2 } AngleType; @interface EMResponder : NSObject { double current_value; // the current number (which is being edited) double previous_value; // the other operand (previous operand) double e_value; // the number e OpType op_type; // the current operator AngleType angle_type; // type of angle used (radian, degree, gradient) int trailing_digits; // used in decimal number input BOOL isNewDigit; // allow new number in display } // class method prototypes - (double)getCurrentValue; - (int)getTrailingDigits; - (void)setCurrentValue:(double)num; - (void)setState:(NSDictionary *)stateDictionary; - (NSDictionary *)state; - (void)newDigit:(int)digit; - (void)period; - (void)pi; - (void) trig_constant: (double) trig_const; - (void)e; - (void)clear; - (void)operation:(OpType)new_op_type; - (void)enter; // Algebraic functions - (void)reverse_sign; - (void)percentage; - (void)squared; - (void)cubed; - (void) square_root; - (void) cubed_root; - (void)ln; - (void)logarithm; - (void)factorial; - (double) factorial: (double) n; - (void)powerE; - (void)power10; - (void)inverse; // Trigometric functions - (void)setAngleType:(AngleType)aType; - (double)deg_to_rad:(double)degrees; - (double)rad_to_deg:(double)radians; - (double)grad_to_rad:(double)gradients; - (double)rad_to_grad:(double)radians; - (void)sine; - (void)cosine; - (void)tangent; - (void)arcsine; - (void)arccosine; - (void)arctangent; // Probability functions - (double) generate_random_num; - (void)random_num; @end edenmath.app-1.1.1a/EMResponder.m0000644000175000017500000004476610063367242017052 0ustar brentbrent00000000000000// // EMResponder.m // EdenMath // // Created by admin on Thu Feb 21 2002. // Copyright (c) 2002-2004 Edenwaith. All rights reserved. // #import "EMResponder.h" #include #include #ifdef GNUSTEP #include #endif @implementation EMResponder // ------------------------------------------------------- // (id) init // ------------------------------------------------------- - (id) init { current_value = 0.0; previous_value = 0.0; op_type = NO_OP; angle_type = DEGREE; e_value = M_E; // 2.7182818285 trailing_digits = 0; isNewDigit = YES; return self; } // ------------------------------------------------------- // (double) getCurrentValue // Simple return function which returns the current // value // ------------------------------------------------------- - (double) getCurrentValue { return current_value; } // ------------------------------------------------------- // (int) getTrailingDigits // Simple return function which returns the number of // trailing digits on the currently displayed number // so the proper amount of precision can be displayed. // Limit the number of trailing digits precision so odd // errors don't occur. // ------------------------------------------------------- - (int) getTrailingDigits { if (trailing_digits == 0) { trailing_digits = 0; } else if (trailing_digits > 10) { trailing_digits = 10; } return trailing_digits; } // ------------------------------------------------------- // (void) setCurrentValue:(double)num // ------------------------------------------------------- - (void) setCurrentValue:(double)num { current_value = num; } // ------------------------------------------------------- // (void) setState:(NSDictionary *)stateDictionary // ------------------------------------------------------- - (void)setState:(NSDictionary *)stateDictionary { current_value = [[stateDictionary objectForKey: @"current_value"] doubleValue]; previous_value = [[stateDictionary objectForKey: @"previous_value"] doubleValue]; op_type = [[stateDictionary objectForKey: @"op_type"] intValue]; trailing_digits = [[stateDictionary objectForKey: @"trailing_digits"] intValue]; isNewDigit = [[stateDictionary objectForKey: @"isNewDigit"] boolValue]; } // ------------------------------------------------------- // (NSDictionary *) state // ------------------------------------------------------- - (NSDictionary *)state { NSDictionary *stateDictionary = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithDouble: current_value], @"current_value", [NSNumber numberWithDouble: previous_value], @"previous_value", [NSNumber numberWithInt: op_type], @"op_type", [NSNumber numberWithInt: trailing_digits], @"trailing_digits", [NSNumber numberWithBool: isNewDigit], @"isNewDigit", nil]; return stateDictionary; } // ------------------------------------------------------- // (void)newDigit:(int)digit // ------------------------------------------------------- - (void)newDigit:(int)digit { if (isNewDigit) { previous_value = current_value; isNewDigit = NO; current_value = digit; } else { BOOL negative = NO; if (current_value < 0) { current_value = - current_value; negative = YES; } if (trailing_digits == 0) { current_value = current_value * 10 + digit; } else { current_value = current_value + (digit/pow(10.0, trailing_digits)); trailing_digits++; } if (negative == YES) { current_value = - current_value; } } } // ------------------------------------------------------- // (void) period // ------------------------------------------------------- - (void)period { if (isNewDigit) { current_value = 0.0; isNewDigit = NO; } if (trailing_digits == 0) { trailing_digits = 1; } } // ------------------------------------------------------- // (void) pi // Display the constant pi (3.141592653589793) // ------------------------------------------------------- - (void) pi { current_value = M_PI; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void) trig_constant // Display the constant pi (3.141592653589793) // ------------------------------------------------------- - (void) trig_constant: (double) trig_const { current_value = trig_const; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void) e // Display the constant e (2.718281828459045) // ------------------------------------------------------- - (void)e { current_value = M_E; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void) clear // clear the displayField and reset several variables // ------------------------------------------------------- - (void) clear { current_value = 0.0; previous_value = 0.0; op_type = NO_OP; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void)operation:(OpType)new_op_type // ------------------------------------------------------- - (void)operation:(OpType)new_op_type { if (op_type == NO_OP) { previous_value = current_value; isNewDigit = YES; op_type = new_op_type; trailing_digits = 0; } else { // cascading operations [self enter]; // calculate previous value, first previous_value = current_value; isNewDigit = YES; op_type = new_op_type; trailing_digits = 0; } } // ------------------------------------------------------- // (void)enter // For binary operators (+, -, x, /, etc.), calculate // the value and place into current_value // ------------------------------------------------------- - (void)enter { switch (op_type) { case NO_OP: break; case ADD_OP: current_value = previous_value + current_value; break; case SUBTRACT_OP: current_value = previous_value - current_value; break; case MULTIPLY_OP: current_value = previous_value * current_value; break; case DIVIDE_OP: if (current_value != 0.0) { current_value = previous_value / current_value; } break; case EXPONENT_OP: // x^y current_value = pow(previous_value, current_value); break; case XROOT_OP: // yx current_value = pow(previous_value, 1/current_value); break; case MOD_OP: current_value = (int)previous_value % (int)current_value; break; case EE_OP: current_value = previous_value * pow(10, current_value); break; case NPR_OP: // n!/(n-r)! current_value = [self factorial:previous_value] / [self factorial:(previous_value - current_value)]; break; case NCR_OP: // n!/(r! * (n-r)!) current_value = [self factorial:previous_value] / ([self factorial:current_value] * [self factorial:(previous_value - current_value)]); break; } previous_value = 0.0; op_type = NO_OP; trailing_digits = 0; isNewDigit = YES; } // ===================================================================================== // ALGEBRAIC FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) reverse_sign // ------------------------------------------------------- - (void) reverse_sign { current_value = - current_value; } // ------------------------------------------------------- // (void)percentage // ------------------------------------------------------- - (void)percentage { current_value = current_value * 0.01; isNewDigit = YES; trailing_digits = 0; } // ------------------------------------------------------- // (void) squared // ------------------------------------------------------- - (void) squared { current_value = pow(current_value, 2); isNewDigit = YES; } // ------------------------------------------------------- // (void) cubed // ------------------------------------------------------- - (void) cubed { current_value = pow(current_value, 3); isNewDigit = true; } // ------------------------------------------------------- // (void) square_root // ------------------------------------------------------- - (void) square_root { if (current_value >= 0.0) { current_value = sqrt(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) cubed_root // ------------------------------------------------------- - (void)cubed_root { //if (current_value >= 0.0) //{ current_value = pow(current_value, 0.3333333333333333); //} isNewDigit = YES; } // ------------------------------------------------------- // (void) ln // natural log // ------------------------------------------------------- - (void)ln { if (current_value > 0.0) { current_value = log(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) cubed_root // logarithm base 10 // ------------------------------------------------------- - (void)logarithm { if (current_value > 0.0) { current_value = log10(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) factorial // This new function replaces the old factorial function // with a gamma function. For more information, read the // lgamma man page or // http://www.gnu.org/software/libc/manual/html_node/Special-Functions.html // Version: 8. March 2004 23:40 // ------------------------------------------------------- - (void) factorial { double lg; // 170.5 seems to be the max value which EdenMath can handle if (current_value < 170.5) { lg = lgamma(current_value+1.0); current_value = signgam*exp(lg); /* signgam is a predefined variable */ } trailing_digits = 0; // this allows for more precise decimal precision isNewDigit = YES; } // ------------------------------------------------------- // (double) factorial: (double) n // This is required for the permutations and combinations // calls. // Version: 9. March 2004 23:48 // ------------------------------------------------------- - (double) factorial: (double) n { double lg; // 170.5 seems to be the max value which EdenMath can handle if (n < 170.5) { lg = lgamma(n+1.0); n = signgam*exp(lg); } return (n); } // ------------------------------------------------------- // (void) powerE // e^x // M_E is a constant hidden somewhere in the included // libraries // ------------------------------------------------------- - (void) powerE { current_value = pow(M_E, current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) 10^x // ------------------------------------------------------- - (void) power10 { current_value = pow(10, current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) inverse // ------------------------------------------------------- - (void)inverse { if (current_value != 0.0) { current_value = 1/current_value; } isNewDigit = YES; } // ===================================================================================== // TRIGOMETRIC FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) setAngleType:(AngleType)aType // Modify the type of angles using degrees, radians, or // gradients. EM 1.1.1 reduced this code down to one // line, eliminating multiple IF-ELSE statements. // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)setAngleType:(AngleType)aType { angle_type = aType; } // ------------------------------------------------------- // (double)deg_to_rad:(double)degrees // Convert from degrees to radians // ------------------------------------------------------- - (double)deg_to_rad:(double)degrees { double radians = 0.0; radians = degrees * M_PI / 180; return radians; } // ------------------------------------------------------- // (double)rad_to_deg:(double)radians // Convert from radians to degrees // ------------------------------------------------------- // Created: 31. May 2003 // Version: 31. May 2003 // ------------------------------------------------------- - (double)rad_to_deg:(double)radians { double degrees = 0.0; degrees = radians * 180 / M_PI; return degrees; } // ------------------------------------------------------- // (double)grad_to_rad:(double)gradients // Convert from gradients to radians // http://www.onlineconversion.com/angles.htm // 1 gradient = 0.015707963267948966192 radians // 1 gradient = 0.9 degrees // Created higher precision for the conversion so // Tan(50g) would equal 1. Otherwise, if the conversion // isn't precise enough, it comes out to be 1.000003672. // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (double)grad_to_rad:(double)gradients { double radians = 0.0; radians = gradients * 0.015707963267948966192; return radians; } // ------------------------------------------------------- // (double)rad_to_grad:(double)radians // Convert from radians to gradients // http://www.onlineconversion.com/angles.htm // 1 gradient = 0.015707963267948966192 radians // 1 gradient = 0.9 degrees // ------------------------------------------------------- // Created: 31. May 2003 // Version: 31. May 2003 // ------------------------------------------------------- - (double)rad_to_grad:(double)radians { double gradients = 0.0; gradients = radians / 0.015707963267948966192; return gradients; } // ------------------------------------------------------- // (void) sine // ------------------------------------------------------- - (void)sine { if (angle_type == DEGREE) { current_value = [self deg_to_rad:current_value]; } else if (angle_type == GRADIENT) { current_value = [self grad_to_rad:current_value]; } current_value = sin(current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) cosine // ------------------------------------------------------- - (void)cosine { if (angle_type == DEGREE) { current_value = [self deg_to_rad:current_value]; } else if (angle_type == GRADIENT) { current_value = [self grad_to_rad:current_value]; } current_value = cos(current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) tangent // ------------------------------------------------------- - (void)tangent { if (angle_type == DEGREE) { current_value = [self deg_to_rad:current_value]; } else if (angle_type == GRADIENT) { current_value = [self grad_to_rad:current_value]; } if ( ( current_value == M_PI/2) || (current_value == 3 * M_PI / 2) || ( current_value == - M_PI/2) || (current_value == -3 * M_PI / 2) ) { NSBeep(); NSRunAlertPanel(@"Warning", @"Tan cannot calculate values of /2 or 3/2", @"OK", nil, nil); } else // otherwise, tan will still be calculated on /2 or 3/2, which is wrong. { current_value = tan(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) arcsine // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)arcsine { current_value = asin(current_value); isNewDigit = YES; if (angle_type == DEGREE) { current_value = [self rad_to_deg:current_value]; } else if (angle_type == GRADIENT) { current_value = [self rad_to_grad:current_value]; } } // ------------------------------------------------------- // (void) arccosine // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)arccosine { current_value = acos(current_value); isNewDigit = YES; if (angle_type == DEGREE) { current_value = [self rad_to_deg:current_value]; } else if (angle_type == GRADIENT) { current_value = [self rad_to_grad:current_value]; } } // ------------------------------------------------------- // (void) arctangent // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)arctangent { current_value = atan(current_value); isNewDigit = YES; if (angle_type == DEGREE) { current_value = [self rad_to_deg:current_value]; } else if (angle_type == GRADIENT) { current_value = [self rad_to_grad:current_value]; } } // ===================================================================================== // PROBABILITY FUNCTIONS // The Probability and Combination functions are in the enter function since they // act as binary operators // ===================================================================================== // ------------------------------------------------------- // (void) generate_random_num // ------------------------------------------------------- - (double) generate_random_num { static int seeded = 0; double value = 0.0; if (seeded == 0) { srand((unsigned)time((time_t *)NULL)); seeded = 1; } value = rand(); return value; } // ------------------------------------------------------- // (void) random_num // ------------------------------------------------------- - (void) random_num { current_value = [self generate_random_num]; isNewDigit = YES; } @end edenmath.app-1.1.1a/Credits.rtf0000644000175000017500000000066710063366707016620 0ustar brentbrent00000000000000{\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f0\b\fs24 \cf0 Programming & design: \f1\b0 \ Chad Armstrong\ support@edenwaith.com\ \ \f0\b EdenMath website:\ \f1\b0 www.edenwaith.com/products/edenmath/\ \ \f0\b Edenwaith website: \f1\b0 \ www.edenwaith.com}edenmath.app-1.1.1a/EMResponder.m.orig0000644000175000017500000004471510063366707020010 0ustar brentbrent00000000000000// // EMResponder.m // EdenMath // // Created by admin on Thu Feb 21 2002. // Copyright (c) 2002-2004 Edenwaith. All rights reserved. // #import "EMResponder.h" #include #include @implementation EMResponder // ------------------------------------------------------- // (id) init // ------------------------------------------------------- - (id) init { current_value = 0.0; previous_value = 0.0; op_type = NO_OP; angle_type = DEGREE; e_value = M_E; // 2.7182818285 trailing_digits = 0; isNewDigit = YES; return self; } // ------------------------------------------------------- // (double) getCurrentValue // Simple return function which returns the current // value // ------------------------------------------------------- - (double) getCurrentValue { return current_value; } // ------------------------------------------------------- // (int) getTrailingDigits // Simple return function which returns the number of // trailing digits on the currently displayed number // so the proper amount of precision can be displayed. // Limit the number of trailing digits precision so odd // errors don't occur. // ------------------------------------------------------- - (int) getTrailingDigits { if (trailing_digits == 0) { trailing_digits = 0; } else if (trailing_digits > 10) { trailing_digits = 10; } return trailing_digits; } // ------------------------------------------------------- // (void) setCurrentValue:(double)num // ------------------------------------------------------- - (void) setCurrentValue:(double)num { current_value = num; } // ------------------------------------------------------- // (void) setState:(NSDictionary *)stateDictionary // ------------------------------------------------------- - (void)setState:(NSDictionary *)stateDictionary { current_value = [[stateDictionary objectForKey: @"current_value"] doubleValue]; previous_value = [[stateDictionary objectForKey: @"previous_value"] doubleValue]; op_type = [[stateDictionary objectForKey: @"op_type"] intValue]; trailing_digits = [[stateDictionary objectForKey: @"trailing_digits"] intValue]; isNewDigit = [[stateDictionary objectForKey: @"isNewDigit"] boolValue]; } // ------------------------------------------------------- // (NSDictionary *) state // ------------------------------------------------------- - (NSDictionary *)state { NSDictionary *stateDictionary = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithDouble: current_value], @"current_value", [NSNumber numberWithDouble: previous_value], @"previous_value", [NSNumber numberWithInt: op_type], @"op_type", [NSNumber numberWithInt: trailing_digits], @"trailing_digits", [NSNumber numberWithBool: isNewDigit], @"isNewDigit", nil]; return stateDictionary; } // ------------------------------------------------------- // (void)newDigit:(int)digit // ------------------------------------------------------- - (void)newDigit:(int)digit { if (isNewDigit) { previous_value = current_value; isNewDigit = NO; current_value = digit; } else { BOOL negative = NO; if (current_value < 0) { current_value = - current_value; negative = YES; } if (trailing_digits == 0) { current_value = current_value * 10 + digit; } else { current_value = current_value + (digit/pow(10.0, trailing_digits)); trailing_digits++; } if (negative == YES) { current_value = - current_value; } } } // ------------------------------------------------------- // (void) period // ------------------------------------------------------- - (void)period { if (isNewDigit) { current_value = 0.0; isNewDigit = NO; } if (trailing_digits == 0) { trailing_digits = 1; } } // ------------------------------------------------------- // (void) pi // Display the constant pi (3.141592653589793) // ------------------------------------------------------- - (void) pi { current_value = M_PI; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void) trig_constant // Display the constant pi (3.141592653589793) // ------------------------------------------------------- - (void) trig_constant: (double) trig_const { current_value = trig_const; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void) e // Display the constant e (2.718281828459045) // ------------------------------------------------------- - (void)e { current_value = M_E; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void) clear // clear the displayField and reset several variables // ------------------------------------------------------- - (void) clear { current_value = 0.0; previous_value = 0.0; op_type = NO_OP; trailing_digits = 0; isNewDigit = YES; } // ------------------------------------------------------- // (void)operation:(OpType)new_op_type // ------------------------------------------------------- - (void)operation:(OpType)new_op_type { if (op_type == NO_OP) { previous_value = current_value; isNewDigit = YES; op_type = new_op_type; trailing_digits = 0; } else { // cascading operations [self enter]; // calculate previous value, first previous_value = current_value; isNewDigit = YES; op_type = new_op_type; trailing_digits = 0; } } // ------------------------------------------------------- // (void)enter // For binary operators (+, -, x, /, etc.), calculate // the value and place into current_value // ------------------------------------------------------- - (void)enter { switch (op_type) { case NO_OP: break; case ADD_OP: current_value = previous_value + current_value; break; case SUBTRACT_OP: current_value = previous_value - current_value; break; case MULTIPLY_OP: current_value = previous_value * current_value; break; case DIVIDE_OP: if (current_value != 0.0) { current_value = previous_value / current_value; } break; case EXPONENT_OP: // x^y current_value = pow(previous_value, current_value); break; case XROOT_OP: // yx current_value = pow(previous_value, 1/current_value); break; case MOD_OP: current_value = (int)previous_value % (int)current_value; break; case EE_OP: current_value = previous_value * pow(10, current_value); break; case NPR_OP: // n!/(n-r)! current_value = [self factorial:previous_value] / [self factorial:(previous_value - current_value)]; break; case NCR_OP: // n!/(r! * (n-r)!) current_value = [self factorial:previous_value] / ([self factorial:current_value] * [self factorial:(previous_value - current_value)]); break; } previous_value = 0.0; op_type = NO_OP; trailing_digits = 0; isNewDigit = YES; } // ===================================================================================== // ALGEBRAIC FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) reverse_sign // ------------------------------------------------------- - (void) reverse_sign { current_value = - current_value; } // ------------------------------------------------------- // (void)percentage // ------------------------------------------------------- - (void)percentage { current_value = current_value * 0.01; isNewDigit = YES; trailing_digits = 0; } // ------------------------------------------------------- // (void) squared // ------------------------------------------------------- - (void) squared { current_value = pow(current_value, 2); isNewDigit = YES; } // ------------------------------------------------------- // (void) cubed // ------------------------------------------------------- - (void) cubed { current_value = pow(current_value, 3); isNewDigit = true; } // ------------------------------------------------------- // (void) square_root // ------------------------------------------------------- - (void) square_root { if (current_value >= 0.0) { current_value = sqrt(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) cubed_root // ------------------------------------------------------- - (void)cubed_root { //if (current_value >= 0.0) //{ current_value = pow(current_value, 0.3333333333333333); //} isNewDigit = YES; } // ------------------------------------------------------- // (void) ln // natural log // ------------------------------------------------------- - (void)ln { if (current_value > 0.0) { current_value = log(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) cubed_root // logarithm base 10 // ------------------------------------------------------- - (void)logarithm { if (current_value > 0.0) { current_value = log10(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) factorial // This new function replaces the old factorial function // with a gamma function. For more information, read the // lgamma man page or // http://www.gnu.org/software/libc/manual/html_node/Special-Functions.html // Version: 8. March 2004 23:40 // ------------------------------------------------------- - (void) factorial { double lg; // 170.5 seems to be the max value which EdenMath can handle if (current_value < 170.5) { lg = lgamma(current_value+1.0); current_value = signgam*exp(lg); /* signgam is a predefined variable */ } trailing_digits = 0; // this allows for more precise decimal precision isNewDigit = YES; } // ------------------------------------------------------- // (double) factorial: (double) n // This is required for the permutations and combinations // calls. // Version: 9. March 2004 23:48 // ------------------------------------------------------- - (double) factorial: (double) n { double lg; // 170.5 seems to be the max value which EdenMath can handle if (n < 170.5) { lg = lgamma(n+1.0); n = signgam*exp(lg); } return (n); } // ------------------------------------------------------- // (void) powerE // e^x // M_E is a constant hidden somewhere in the included // libraries // ------------------------------------------------------- - (void) powerE { current_value = pow(M_E, current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) 10^x // ------------------------------------------------------- - (void) power10 { current_value = pow(10, current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) inverse // ------------------------------------------------------- - (void)inverse { if (current_value != 0.0) { current_value = 1/current_value; } isNewDigit = YES; } // ===================================================================================== // TRIGOMETRIC FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) setAngleType:(AngleType)aType // Modify the type of angles using degrees, radians, or // gradients. EM 1.1.1 reduced this code down to one // line, eliminating multiple IF-ELSE statements. // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)setAngleType:(AngleType)aType { angle_type = aType; } // ------------------------------------------------------- // (double)deg_to_rad:(double)degrees // Convert from degrees to radians // ------------------------------------------------------- - (double)deg_to_rad:(double)degrees { double radians = 0.0; radians = degrees * M_PI / 180; return radians; } // ------------------------------------------------------- // (double)rad_to_deg:(double)radians // Convert from radians to degrees // ------------------------------------------------------- // Created: 31. May 2003 // Version: 31. May 2003 // ------------------------------------------------------- - (double)rad_to_deg:(double)radians { double degrees = 0.0; degrees = radians * 180 / M_PI; return degrees; } // ------------------------------------------------------- // (double)grad_to_rad:(double)gradients // Convert from gradients to radians // http://www.onlineconversion.com/angles.htm // 1 gradient = 0.015707963267948966192 radians // 1 gradient = 0.9 degrees // Created higher precision for the conversion so // Tan(50g) would equal 1. Otherwise, if the conversion // isn't precise enough, it comes out to be 1.000003672. // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (double)grad_to_rad:(double)gradients { double radians = 0.0; radians = gradients * 0.015707963267948966192; return radians; } // ------------------------------------------------------- // (double)rad_to_grad:(double)radians // Convert from radians to gradients // http://www.onlineconversion.com/angles.htm // 1 gradient = 0.015707963267948966192 radians // 1 gradient = 0.9 degrees // ------------------------------------------------------- // Created: 31. May 2003 // Version: 31. May 2003 // ------------------------------------------------------- - (double)rad_to_grad:(double)radians { double gradients = 0.0; gradients = radians / 0.015707963267948966192; return gradients; } // ------------------------------------------------------- // (void) sine // ------------------------------------------------------- - (void)sine { if (angle_type == DEGREE) { current_value = [self deg_to_rad:current_value]; } else if (angle_type == GRADIENT) { current_value = [self grad_to_rad:current_value]; } current_value = sin(current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) cosine // ------------------------------------------------------- - (void)cosine { if (angle_type == DEGREE) { current_value = [self deg_to_rad:current_value]; } else if (angle_type == GRADIENT) { current_value = [self grad_to_rad:current_value]; } current_value = cos(current_value); isNewDigit = YES; } // ------------------------------------------------------- // (void) tangent // ------------------------------------------------------- - (void)tangent { if (angle_type == DEGREE) { current_value = [self deg_to_rad:current_value]; } else if (angle_type == GRADIENT) { current_value = [self grad_to_rad:current_value]; } if ( ( current_value == M_PI/2) || (current_value == 3 * M_PI / 2) || ( current_value == - M_PI/2) || (current_value == -3 * M_PI / 2) ) { NSBeep(); NSRunAlertPanel(@"Warning", @"Tan cannot calculate values of /2 or 3/2", @"OK", nil, nil); } else // otherwise, tan will still be calculated on /2 or 3/2, which is wrong. { current_value = tan(current_value); } isNewDigit = YES; } // ------------------------------------------------------- // (void) arcsine // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)arcsine { current_value = asin(current_value); isNewDigit = YES; if (angle_type == DEGREE) { current_value = [self rad_to_deg:current_value]; } else if (angle_type == GRADIENT) { current_value = [self rad_to_grad:current_value]; } } // ------------------------------------------------------- // (void) arccosine // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)arccosine { current_value = acos(current_value); isNewDigit = YES; if (angle_type == DEGREE) { current_value = [self rad_to_deg:current_value]; } else if (angle_type == GRADIENT) { current_value = [self rad_to_grad:current_value]; } } // ------------------------------------------------------- // (void) arctangent // ------------------------------------------------------- // Version: 31. May 2003 // ------------------------------------------------------- - (void)arctangent { current_value = atan(current_value); isNewDigit = YES; if (angle_type == DEGREE) { current_value = [self rad_to_deg:current_value]; } else if (angle_type == GRADIENT) { current_value = [self rad_to_grad:current_value]; } } // ===================================================================================== // PROBABILITY FUNCTIONS // The Probability and Combination functions are in the enter function since they // act as binary operators // ===================================================================================== // ------------------------------------------------------- // (void) generate_random_num // ------------------------------------------------------- - (double) generate_random_num { static int seeded = 0; double value = 0.0; if (seeded == 0) { srand((unsigned)time((time_t *)NULL)); seeded = 1; } value = rand(); return value; } // ------------------------------------------------------- // (void) random_num // ------------------------------------------------------- - (void) random_num { current_value = [self generate_random_num]; isNewDigit = YES; } @end edenmath.app-1.1.1a/Read Me.rtf0000644000175000017500000001375310063366707016420 0ustar brentbrent00000000000000{\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Arial-Black;\f1\fswiss\fcharset77 ArialMT;\f2\fswiss\fcharset77 Arial-ItalicMT; \f3\fswiss\fcharset77 Arial-BoldMT;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww10080\viewh9600\viewkind0 \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f0\b\fs48 \cf0 EdenMath 1.1.1\ \f1\b0\fs18 -------------------------------------------------------------------------------------------------------------------------------------------------\ \ \fs24 Congratulations, you are one of the few people who actually reads the standard \f2\i Read Me \f1\i0 file! Contained within is some basic information, installation, licensing, pricing, issues, and updates about the EdenMath scientific calculator.\ \f3\b \ About \f1\b0 \ EdenMath is a scientific calculator, which acts and functions like a standard scientific calculator you could buy at a store. It provides standard arithmetic, trigonometric, algebraic, and probability functions. EdenMath was designed using the Cocoa API, which is exclusive for Mac OS X. \ \ So what makes EdenMath different? \ \ On the surface, EdenMath does not differ too greatly from any other standard scientific calculator you might find. However, a developer's tutorial has been provided, chronicling the design and construction of EdenMath. For the aspiring Cocoa developer, this can prove as a useful tool for an introduction to Cocoa. \ \f3\b \ Installation \f1\b0 \ Simply copy the EdenMath folder over to your Applications folder, and EdenMath will be installed for you. Click on the EdenMath icon inside this folder to launch the EdenMath scientific calculator. You can also keep the EdenMath folder in the location of your choice, and create an EdenMath alias and then drag the alias over to your Applications folder. \f3\b \ \ Licensing \f1\b0 \ As of EdenMath 1.1.1, this application is protected under the GNU General Public License (Version 2). A copy of the GPL is included with EdenMath, enclosed in the file License. If a copy of this License is not present, it can be found at http://www.gnu.org/licenses/gpl.txt. \f3\b \ \ Cost \f1\b0 \ EdenMath is freeware, so it costs you nothing. \f3\b \ \ Known Issues \f1\b0 \ EdenMath evaluates mathematical expressions as they are typed, so the order of operations is not always followed. If the expression 3+2*5 is typed, it will evaluate to 25, instead of 13. This problem is not unique to EdenMath, and is also present in Apple's Calculator application. To circumvent this problem, type in the expression in another form, such as 5*2+3.\ \ Occasionally precision problems will arise, such as the number 0.5 will appear as 0.4999999. EdenMath has been constructed to avoid as many of these problems as possible, but this problem will occur sometimes. \f3\b \ \ Unknown Issues \f1\b0 \ EdenMath was tested under Mac OS 10.1 and 10.2, so it has not been tested under 10.0 or 10.3. EdenMath is not currently supported under 10.0 or 10.3, but you are certainly welcome to try running the program on these systems.\ \ One of the biggest problems regarding unknown issues is just that -- they are unknown. So, if you do find any problems or inconsistencies, please send an e-mail to support@edenwaith.com\ \ \f3\b EdenMath For GNUstep \f1\b0 \ EdenMath has been ported to GNUstep by Robert Burns. For further information about the GNUstep version of EdenMath, visit http://www.eskimo.com/~pburns/rob/EdenMath/ .\ \ \f3\b Updates\ \f1\b0 \ul Version 1.1.1 - May 2004\ulnone \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \cf0 \'a5 Support for non-integer factorials\ \'a5 Constants menu\ \'a5 New application icon\ \'a5 Updated tutorial\ \'a5 Available under GPL\ \'a5 Trimmed down source code\ \'a5 Minor modifications to the interface\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \cf0 \ul \ Version 1.1.0 - 1. June 2003\ulnone \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \cf0 \'a5 New interface design & icon\ \'a5 Updated tutorial.\ \'a5 Arcsine, Arccosine, and Arctangent now work properly. The logic behind them for previous versions of EdenMath was backwards, so none of these worked correctly except when using radians.\ \'a5 3.0% will now show up correctly as 0.03. It showed up as 0.0 before.\ \'a5 Increased the precision for the conversion to gradients so answers using gradients will be more accurate.\ \'a5 Before, 0! would crash the program. It now correctly returns the answer of 1.\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f3\b \cf0 \ \f1\b0 \ul Version 1.0.2 - 1. July 2002\ulnone \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \cf0 \'a5 Annoying precision bug which evaluated some numbers such as 65.1 to 65.0999999999 has been corrected.\ \'a5 Entire project (including nib files and source code) has been included, instead of just the source code.\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f3\b \cf0 \ \f1\b0 \ul Version 1.0.1 - 29. May 2002\ulnone \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \cf0 \'a5 Switched the multiplication mnemonic from 'x' to '*'.\ \'a5 Added additional material to the About Box.\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \cf0 \ \f3\b Websites \f1\b0 \ Edenwaith: http://www.edenwaith.com\ EdenMath: http://www.edenwaith.com/products/edenmath/\ EdenMath tutorial: http://www.edenwaith.com/development/tutorials/edenmath/\ Support: support@edenwaith.com\ \ \fs18 ------------------------------------------------------------------------------------------------------------------------------------------------- \fs24 \ \pard\tx0\tx1120\tx2240\tx3360\tx4480\tx5600\tx6720\tx7840\tx8960\tx10080\tx11200\tx12320\tx13440\tx14560\tx15680\tx16800\tx17920\tx19040\tx20160\tx21280\tx22400\tx23520\tx24640\tx25760\tx26880\tx28000\tx29120\tx30240\tx31360\tx32480\tx33600\tx34720\ql\qnatural \cf0 \'a9 2004 Edenwaith \ }edenmath.app-1.1.1a/EdenMath.help/0000755000175000017500000000000010070211522017067 5ustar brentbrent00000000000000edenmath.app-1.1.1a/EdenMath.help/edenmath.gif0000644000175000017500000000121710070211367021353 0ustar brentbrent00000000000000GIF89apթ֥DZࡡǏئ̹ҋ򸸷ՆׯأⴴÉ忿ttt游ݰ§㕕מ!p,ppSHg*m3_&VmG: d mm eCWOp9Q #E i6Lp05jlPiA[ ckD.mohl(kj<+2oo$ l`jnl)Kmnnh lnk@4 kbf8h@3-ܨI@m7Ҩafd.)TH/k޸9aM$&ă4%P9q BC 8 ˎ@ Cn,HaT) BA@;edenmath.app-1.1.1a/EdenMath.help/main.xlp0000644000175000017500000000111510070211522020536 0ustar brentbrent00000000000000
EdenMath Help
EdenMath is a scientific calculator, providing standard 4-function arithmetic, probability, trigometric and algebraic functions. EdenMath works like any standard calculator with binary (+, -, *, /) and unary (!, %) operators.

For more information on how to construct a scientific calculator using the Cocoa API, go to http://www.edenwaith.com/development/tutorials/edenmath/.

If you have further questions, send an e-mail to support@edenwaith.com.
edenmath.app-1.1.1a/EdenMath.tiff0000644000175000017500000002244410063647762017045 0ustar brentbrent00000000000000II*$!CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC ; $$$P111&&&%%%$$$,,,666444555DDD[[[rrr{{{xxxuuuuuuuuuuuuuuuuuuppp^^^DDD,,,$$$$$$---777444333AAALLLUUUUUU^(((YYYuuufffSSS333yDDDtUUUtXXXtUUUtSSStSSStSSStSSStSSStSSStPPPtBBBt---tttYYYwwwfff\\\FFF#)))xxxVVV :xxxyyy2(((suuu___ :qqqyyy 222nlll :vvv 888nggg : 999nggg """: 888nlll ###: 555nmmm """: 555nooo :zzz 555nqqq !!!:{{{555nttt !!!:~~~666nvvv !!!:777nyyy !!!:777n{{{ !!!:888n}}} !!!:888n~~~ !!!:888n !!!:888n !!!:888n !!!:888n !!!:888n~~~ !!!:888n}}} !!!:777n{{{ !!!:777nzzz !!!:666nxxx !!!:666nuuu !!!:555nsss !!!:}}}555nppp :yyy 444nnnn :www 333nkkk :ttt 333niii :qqq 333neee :qqq 444n___ :vvv}}} 777nWWW !!!:~~~ppp 777npppTTT !!!:wwwooojjj 666lll```hhhnnn)))Vdddeee___"*???ttt000Y 777kkkOOO3+++h888BBBcccnnnIIIk:::N )))f444y???ZZZ~~~JJJqBBBY?///222777???JJJRRRSSSSSSTTTSSSUUUEEEb %...111666===HHHPPPSSSSSSTTTTTTUUUOOOp00$ $$@$%%(REdenMath2.tiffCreated with The GIMPHHedenmath.app-1.1.1a/EdenMathInfo.plist0000644000175000017500000000060410121040621020026 0ustar brentbrent00000000000000{ ApplicationDescription = "A Scientific Calculator"; ApplicationIcon = "EdenMath.tiff"; NSIcon = "EdenMath.tiff"; Copyright = "Copyright (C) 2003 Edenwaith"; ApplicationName = EdenMath; ApplicationRelease = 1.1.1; Authors = ("Chad Armstrong "); FullVersionID = 1.1.0; URL = "http://www.edenwaith.com/prodeucts/edenmath/"; VersionCheck = 5; } edenmath.app-1.1.1a/EMController.h0000644000175000017500000000454010063372406017207 0ustar brentbrent00000000000000// // EMController.h // EdenMath // // Created by admin on Thu Feb 21 2002. // Copyright (c) 2002-2004 Edenwaith. All rights reserved. // #import #import #import "EMResponder.h" #include @interface EMController : NSObject { EMResponder *em; // model responder to buttons IBOutlet NSTextField *displayField; // display field showing output NSUndoManager *undoManager; // the undo manager } // prototypes for EMController class methods - (void)off:(id)sender; - (void)clear:(id)sender; - (void)cut:(id)sender; - (void)copy:(id)sender; - (void)paste:(id)sender; - (void)updateDisplay; - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication; - (void)saveState; - (void)setState:(NSDictionary *)emState; - (void)undoAction:(id)sender; - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)sender; - (IBAction) checkForNewVersion: (id) sender; - (IBAction) goToProductPage : (id) sender; - (IBAction) goToFeedbackPage: (id) sender; // Arithmetic functions & constants - (void) digitButton: (id) sender; - (void)period:(id)sender; - (void)pi2:(id)sender; - (void)pi3_2:(id)sender; - (void)pi:(id)sender; - (void)pi_2:(id)sender; - (void)pi_3:(id)sender; - (void)pi_4:(id)sender; - (void)pi_6:(id)sender; - (void)e:(id)sender; // Standard 4-function calc methods - (void)enter:(id)sender; - (void)add:(id)sender; - (void)subtract:(id)sender; - (void)multiply:(id)sender; - (void)divide:(id)sender; - (void)reverse_sign:(id)sender; - (void)percentage:(id)sender; - (void)mod:(id)sender; - (void)EE:(id)sender; // Algebraic functions - (void)squared:(id)sender; - (void)cubed:(id)sender; - (void)exponent:(id)sender; - (void)square_root:(id)sender; - (void)cubed_root:(id)sender; - (void)xroot:(id)sender; - (void)ln:(id)sender; - (void)logarithm:(id)sender; - (void)factorial:(id)sender; - (void)powerE:(id)sender; - (void)power10:(id)sender; - (void)inverse:(id)sender; // Trigonometric functions - (void)setDegree:(id)sender; - (void)setRadian:(id)sender; - (void)setGradient:(id)sender; - (void)sine:(id)sender; - (void)cosine:(id)sender; - (void)tangent:(id)sender; - (void)arcsine:(id)sender; - (void)arccosine:(id)sender; - (void)arctangent:(id)sender; // Probability functions - (void)permutation:(id)sender; - (void)combination:(id)sender; - (void)random_num:(id)sender; @end edenmath.app-1.1.1a/EMController.m0000644000175000017500000005552010070177071017217 0ustar brentbrent00000000000000// // EMController.m // EdenMath // // Created by admin on Thu Feb 21 2002. // Copyright (c) 2002-2004 Edenwaith. All rights reserved. // #import "EMController.h" @implementation EMController // ------------------------------------------------------- // (id)init // Allocate memory and french fries for EdenMath // ------------------------------------------------------- - (id)init { em = [[EMResponder alloc] init]; undoManager = [[NSUndoManager alloc] init]; return self; } // ------------------------------------------------------- // (void)dealloc // Deallocate/free up memory used by Edenmath // ------------------------------------------------------- - (void)dealloc { [em release]; [undoManager release]; [super dealloc]; } // ------------------------------------------------------- // (void) awakeFromNib // ------------------------------------------------------- - (void)awakeFromNib { [[displayField window] makeKeyAndOrderFront:self]; #ifdef GNUSTEP id tempView = [[[displayField window] contentView] viewWithTag: 42]; [[tempView cellWithTag: 12] setTarget: self]; [[tempView cellWithTag: 12] setAction: @selector(setDegree:)]; [[tempView cellWithTag: 13] setTarget: self]; [[tempView cellWithTag: 13] setAction: @selector(setRadian:)]; [[tempView cellWithTag: 14] setTarget: self]; [[tempView cellWithTag: 14] setAction: @selector(setGradient:)]; #endif } // ------------------------------------------------------- // (void) off:(id)sender // When the Off button is pressed, the application is // terminated // ------------------------------------------------------- - (void)off:(id)sender { [NSApp terminate:self]; } // ------------------------------------------------------- // (void) clear:(id)sender // ------------------------------------------------------- - (void)clear:(id)sender { [self saveState]; [em clear]; [self updateDisplay]; } // ------------------------------------------------------- // (void) cut:(id)sender // ------------------------------------------------------- - (void)cut:(id)sender { [self copy:sender]; [self saveState]; [self clear:self]; } // ------------------------------------------------------- // (void) copy:(id)sender // ------------------------------------------------------- - (void)copy:(id)sender { NSString *contents = [displayField stringValue]; NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; [pasteboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil]; [pasteboard setString:contents forType:NSStringPboardType]; } // ------------------------------------------------------- // (void) paste:(id)sender // ------------------------------------------------------- - (void)paste:(id)sender { NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; NSString *type = [pasteboard availableTypeFromArray:[NSArray arrayWithObject:NSStringPboardType]]; if (type != nil) { NSString *contents = [pasteboard stringForType:type]; if (contents != nil) { NSScanner *scanner = [NSScanner scannerWithString:contents]; double value; if ([scanner scanDouble:&value]) { [self saveState]; [em setCurrentValue:value]; [self updateDisplay]; } } } } // ------------------------------------------------------- // (void) updateDisplay:(id)sender // Update the value in the display field on the // calculator. In versions 1.0.0 and 1.0.1, this was // a 1 line method. Because of odd precision problems and // numbers like 0.001 not showing the 0's as they are // typed has required the extra 50 (or so) lines of code // ------------------------------------------------------- - (void)updateDisplay { double current_value = [em getCurrentValue]; char *y = "%15."; int i = [em getTrailingDigits]; char *z = "f"; char c_string[32] = ""; NSString *true_precision = [[NSString alloc] initWithFormat: @"%s%d%s", y, i-1, z]; NSString *new_string; // = [[NSString alloc] init]; // variables for the new algorithm to format numbers properly and eliminate unncessary // '0' from the end of a final number. char final_string[32] = ""; int cs_len = 0; int j = 0; int decimal_places = 0; BOOL is_decimal = NO; // 0 is false, 1 is true BOOL is_zero = YES; // is true int new_len = 0; int num_zeros = 0; NSString *precision = @"%15.10f"; // default precision NSString *string_value = [NSString stringWithFormat:precision, current_value]; // convert to string with certain string format if (i != 0) // if there ARE some set trailing digits like 65.2 or 0.001 { NSString *other_value = [NSString stringWithFormat:true_precision, current_value]; [displayField setStringValue: other_value]; } else // no trailing_digits because it is a number like 6 or it is an answer and // trailing_digits was reset to 0 { // loop through the string converted version of the current_value, and cut // off any excess 0's at the end of the number, so 63.20 will appear like 63.2 current_value = [string_value doubleValue]; [string_value getCString: c_string]; // new algorithm for formating numbers properly on output // check to see if there is a decimal place, and if so, how many // decimal places exist cs_len = strlen(c_string); for (j = 0; j < cs_len; j++) { if (c_string[j] == '.') { is_decimal = YES; while (j < cs_len) { j++; decimal_places++; } } } // if a decimal place exists, go through to get rid of unnecessary 0's at // the end of the number so 65.20 will appear to be 65.2 if (is_decimal == YES) { for (j = 0; (j < decimal_places) && (is_zero == YES); j++) { new_len = cs_len - (1 + j); // count the number of 0's at the end if (c_string[new_len] == '0') { num_zeros++; } else if (c_string[new_len] == '.') { num_zeros++; is_zero = NO; } else // otherwise, no more excess 0's to be found { is_zero = NO; } } // loop through the necessary number of times to get rid of // unneeded 0's for (j = 0; j < (cs_len - num_zeros); j++) { final_string[j] = c_string[j]; } } else // otherwise, there is no decimal place { strcpy(final_string, c_string); } new_string = [NSString stringWithFormat:@"%s", final_string]; // When printing out to NSLog, new_string looks odd (\\304\\026\\010\\304), // but when placed as a parameter, it seems to work. Go figure. [displayField setStringValue: new_string]; } } // ------------------------------------------------------- // (BOOL) applicationShould....:(NSApplication *)theApplication // Terminate the program when the last window closes // Need to connect File Owner and Window to EMController // for this to work correctly // ------------------------------------------------------- - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; } // ------------------------------------------------------- // (void) saveState // ------------------------------------------------------- - (void)saveState { [undoManager registerUndoWithTarget:self selector:@selector(setState:) object:[em state]]; } // ------------------------------------------------------- // (void) setState // ------------------------------------------------------- - (void)setState:(NSDictionary *)emState { [self saveState]; [em setState:emState]; [self updateDisplay]; } // ------------------------------------------------------- // (void) undoAction // ------------------------------------------------------- - (void)undoAction:(id)sender { if ([undoManager canUndo]) { [undoManager undo]; } } // ------------------------------------------------------- // (NSUndoManager *) windowWillReturnUndoManager:(NSWindow *)sender // ------------------------------------------------------- - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)sender { return undoManager; } // ------------------------------------------------------- // (IBAction) checkForNewVersion: (id) sender // ------------------------------------------------------- // Version: 8. May 2004 23:55 // Created: 8. May 2004 23:55 // ------------------------------------------------------- - (IBAction) checkForNewVersion: (id) sender { NSString *currentVersionNumber = [[[NSBundle bundleForClass:[self class]] infoDictionary] objectForKey:@"VersionCheck"]; NSDictionary *productVersionDict = [NSDictionary dictionaryWithContentsOfURL: [NSURL URLWithString:@"http://www.edenwaith.com/version.xml"]]; NSString *latestVersionNumber = [productVersionDict valueForKey:@"EdenMath"]; int button = 0; NSLog(currentVersionNumber); NSLog(latestVersionNumber); if ( latestVersionNumber == nil ) { NSBeep(); NSRunAlertPanel(@"Could not check for update", @"A problem arose while attempting to check for a new version of EdenMath. Edenwaith.com may be temporarily unavailable or your network may be down.", @"OK", nil, nil); } else if ( [latestVersionNumber isEqualToString: currentVersionNumber] ) { NSRunAlertPanel(@"Software is Up-To-Date", @"You have the most recent version of EdenMath.", @"OK", nil, nil); } else { button = NSRunAlertPanel(@"New Version is Available", @"A new version of EdenMath is available.", @"OK", @"Cancel", nil); if (NSOKButton == button) { [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:@"http://www.edenwaith.com/downloads/edenmath.php"]]; } } } // ------------------------------------------------------- // (IBAction) goToProductPage: (id) sender // ------------------------------------------------------- // Version: 8. May 2004 23:55 // Created: 8. May 2004 23:55 // ------------------------------------------------------- - (IBAction) goToProductPage: (id) sender { [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:@"http://www.edenwaith.com/products/edenmath/"]]; } // ------------------------------------------------------- // (IBAction) goToFeedbackPage: (id) sender // ------------------------------------------------------- // Version: 8. May 2004 23:55 // Created: 8. May 2004 23:55 // ------------------------------------------------------- - (IBAction) goToFeedbackPage: (id) sender { [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:@"http://www.edenwaith.com/support/feedback.php?app=EdenMath"]]; } // ===================================================================================== // CONSTANTS // ===================================================================================== // ------------------------------------------------------- // (void) digitButton:(id)sender // New addition to EM 1.1.1 which eliminates ten other // functions (zeroButton...nineButton) so each number // button does not explicitly need to point to a new // function. // ------------------------------------------------------- - (void) digitButton: (id) sender { [self saveState]; [em newDigit: [[sender title] intValue]]; [self updateDisplay]; } // ------------------------------------------------------- // (void) period:(id)sender // ------------------------------------------------------- - (void)period:(id)sender { [self saveState]; [em period]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi2:(id)sender // ------------------------------------------------------- - (void)pi2:(id)sender { [self saveState]; [em trig_constant:2*M_PI]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi3_2:(id)sender // ------------------------------------------------------- - (void)pi3_2:(id)sender { [self saveState]; [em trig_constant:3*M_PI/2]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi:(id)sender // ------------------------------------------------------- - (void)pi:(id)sender { [self saveState]; [em pi]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi_2:(id)sender // ------------------------------------------------------- - (void)pi_2:(id)sender { [self saveState]; [em trig_constant:M_PI/2]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi_3:(id)sender // ------------------------------------------------------- - (void)pi_3:(id)sender { [self saveState]; [em trig_constant:M_PI/3]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi_4:(id)sender // ------------------------------------------------------- - (void)pi_4:(id)sender { [self saveState]; [em trig_constant:M_PI/4]; [self updateDisplay]; } // ------------------------------------------------------- // (void) pi_6:(id)sender // ------------------------------------------------------- - (void)pi_6:(id)sender { [self saveState]; [em trig_constant:M_PI/6]; [self updateDisplay]; } // ------------------------------------------------------- // (void) e:(id)sender // ------------------------------------------------------- - (void)e:(id)sender { [self saveState]; [em e]; [self updateDisplay]; } // ===================================================================================== // STANDARD FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) enter:(id)sender // ------------------------------------------------------- - (void)enter:(id)sender { [self saveState]; [em enter]; [self updateDisplay]; } // ------------------------------------------------------- // (void) add:(id)sender // ------------------------------------------------------- - (void)add:(id)sender { [self saveState]; [em operation:ADD_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) subtract:(id)sender // ------------------------------------------------------- - (void)subtract:(id)sender { [self saveState]; [em operation:SUBTRACT_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) multiply:(id)sender // ------------------------------------------------------- - (void)multiply:(id)sender { [self saveState]; [em operation:MULTIPLY_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) divide:(id)sender // ------------------------------------------------------- - (void)divide:(id)sender { [self saveState]; [em operation:DIVIDE_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) reverse_sign:(id)sender // ------------------------------------------------------- - (void)reverse_sign:(id)sender { [self saveState]; [em reverse_sign]; [self updateDisplay]; } // ------------------------------------------------------- // (void) percentage:(id)sender // ------------------------------------------------------- - (void)percentage:(id)sender { [self saveState]; [em percentage]; [self updateDisplay]; } // ------------------------------------------------------- // (void) mod:(id)sender // ------------------------------------------------------- - (void)mod:(id)sender { [self saveState]; [em operation:MOD_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) EE:(id)sender // ------------------------------------------------------- - (void)EE:(id)sender { [self saveState]; [em operation:EE_OP]; [self updateDisplay]; } // ===================================================================================== // ALGEBRAIC FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) exponent:(id)sender // x^2 // ------------------------------------------------------- - (void)squared:(id)sender { [self saveState]; [em squared]; [self updateDisplay]; } // ------------------------------------------------------- // (void) cubed:(id)sender // x^2 // ------------------------------------------------------- - (void)cubed:(id)sender { [self saveState]; [em cubed]; [self updateDisplay]; } // ------------------------------------------------------- // (void) exponent:(id)sender // x^y // ------------------------------------------------------- - (void)exponent:(id)sender { [self saveState]; [em operation:EXPONENT_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) xroot:(id)sender // // ------------------------------------------------------- - (void)square_root:(id)sender { [self saveState]; [em square_root]; [self updateDisplay]; } // ------------------------------------------------------- // (void) xroot:(id)sender // 3 // ------------------------------------------------------- - (void)cubed_root:(id)sender { [self saveState]; [em cubed_root]; [self updateDisplay]; } // ------------------------------------------------------- // (void) xroot:(id)sender // // ------------------------------------------------------- - (void)xroot:(id)sender { [self saveState]; [em operation:XROOT_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) ln:(id)sender // ------------------------------------------------------- - (void)ln:(id)sender { [self saveState]; [em ln]; [self updateDisplay]; } // ------------------------------------------------------- // (void) logarithm:(id)sender // ------------------------------------------------------- - (void)logarithm:(id)sender { [self saveState]; [em logarithm]; [self updateDisplay]; } // ------------------------------------------------------- // (void) factorial:(id)sender // ------------------------------------------------------- - (void)factorial:(id)sender { [self saveState]; [em factorial]; [self updateDisplay]; } // ------------------------------------------------------- // (void) inverse:(id)sender // e^x // ------------------------------------------------------- - (void)powerE:(id)sender { [self saveState]; [em powerE]; [self updateDisplay]; } // ------------------------------------------------------- // (void) inverse:(id)sender // 10^x // ------------------------------------------------------- - (void)power10:(id)sender { [self saveState]; [em power10]; [self updateDisplay]; } // ------------------------------------------------------- // (void) inverse:(id)sender // ------------------------------------------------------- - (void)inverse:(id)sender { [self saveState]; [em inverse]; [self updateDisplay]; } // ===================================================================================== // TRIGOMETRIC FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) setDegree:(id)sender // ------------------------------------------------------- - (void)setDegree:(id)sender { [self saveState]; [em setAngleType:DEGREE]; [self updateDisplay]; } // ------------------------------------------------------- // (void) setRadian:(id)sender // ------------------------------------------------------- - (void)setRadian:(id)sender { [self saveState]; [em setAngleType:RADIAN]; [self updateDisplay]; } // ------------------------------------------------------- // (void) setGradient:(id)sender // ------------------------------------------------------- - (void)setGradient:(id)sender { [self saveState]; [em setAngleType:GRADIENT]; [self updateDisplay]; } // ------------------------------------------------------- // (void) sine:(id)sender // ------------------------------------------------------- - (void)sine:(id)sender { [self saveState]; [em sine]; [self updateDisplay]; } // ------------------------------------------------------- // (void) cosine:(id)sender // ------------------------------------------------------- - (void)cosine:(id)sender { [self saveState]; [em cosine]; [self updateDisplay]; } // ------------------------------------------------------- // (void) tangent:(id)sender // ------------------------------------------------------- - (void)tangent:(id)sender { [self saveState]; [em tangent]; [self updateDisplay]; } // ------------------------------------------------------- // (void) arcsine:(id)sender // ------------------------------------------------------- - (void)arcsine:(id)sender { [self saveState]; [em arcsine]; [self updateDisplay]; } // ------------------------------------------------------- // (void) arccosine:(id)sender // ------------------------------------------------------- - (void)arccosine:(id)sender { [self saveState]; [em arccosine]; [self updateDisplay]; } // ------------------------------------------------------- // (void) arctangent:(id)sender // ------------------------------------------------------- - (void)arctangent:(id)sender { [self saveState]; [em arctangent]; [self updateDisplay]; } // ===================================================================================== // PROBABILITY FUNCTIONS // ===================================================================================== // ------------------------------------------------------- // (void) permutation:(id)sender // nPr // ------------------------------------------------------- - (void)permutation:(id)sender { [self saveState]; [em operation:NPR_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) combination:(id)sender // ------------------------------------------------------- - (void)combination:(id)sender { [self saveState]; [em operation:NCR_OP]; [self updateDisplay]; } // ------------------------------------------------------- // (void) random_num:(id)sender // ------------------------------------------------------- - (void)random_num:(id)sender { [self saveState]; [em random_num]; [self updateDisplay]; } @end edenmath.app-1.1.1a/main.m0000644000175000017500000000016010063366707015574 0ustar brentbrent00000000000000#import int main(int argc, const char *argv[]) { return NSApplicationMain(argc, argv); } edenmath.app-1.1.1a/LICENSE.rtf0000644000175000017500000004075110063366707016303 0ustar brentbrent00000000000000{\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww12380\viewh9060\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \f0\fs24 \cf0 The General Public License (GPL)\ \ Version 2, June 1991\ \ Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA.\ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is\ not allowed.\ \ Preamble\ \ The licenses for most software are designed to take away your freedom to share and change it. By\ contrast, the GNU General Public License is intended to guarantee your freedom to share and change free\ software--to make sure the software is free for all its users. This General Public License applies to most of\ the Free Software Foundation's software and to any other program whose authors commit to using it.\ (Some other Free Software Foundation software is covered by the GNU Library General Public License\ instead.) You can apply it to your programs, too.\ \ When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are\ designed to make sure that you have the freedom to distribute copies of free software (and charge for this\ service if you wish), that you receive source code or can get it if you want it, that you can change the\ software or use pieces of it in new free programs; and that you know you can do these things.\ \ To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask\ you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute\ copies of the software, or if you modify it.\ \ For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the\ recipients all the rights that you have. You must make sure that they, too, receive or can get the source\ code. And you must show them these terms so they know their rights.\ \ We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives\ you legal permission to copy, distribute and/or modify the software.\ \ Also, for each author's protection and ours, we want to make certain that everyone understands that there\ is no warranty for this free software. If the software is modified by someone else and passed on, we want\ its recipients to know that what they have is not the original, so that any problems introduced by others will\ not reflect on the original authors' reputations.\ \ Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that\ redistributors of a free program will individually obtain patent licenses, in effect making the program\ proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use\ or not licensed at all.\ \ The precise terms and conditions for copying, distribution and modification follow.\ \ GNU GENERAL PUBLIC LICENSE\ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\ \ 0. This License applies to any program or other work which contains a notice placed by the copyright\ holder saying it may be distributed under the terms of this General Public License. The "Program", below,\ refers to any such program or work, and a "work based on the Program" means either the Program or any\ derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either\ verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included\ without limitation in the term "modification".) Each licensee is addressed as "you".\ \ Activities other than copying, distribution and modification are not covered by this License; they are outside\ its scope. The act of running the Program is not restricted, and the output from the Program is covered\ only if its contents constitute a work based on the Program (independent of having been made by running\ the Program). Whether that is true depends on what the Program does.\ \ 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any\ medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright\ notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence\ of any warranty; and give any other recipients of the Program a copy of this License along with the\ Program.\ \ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty\ protection in exchange for a fee.\ \ 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on\ the Program, and copy and distribute such modifications or work under the terms of Section 1 above,\ provided that you also meet all of these conditions:\ \ a) You must cause the modified files to carry prominent notices stating that you changed the files and the\ date of any change.\ \ b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived\ from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the\ terms of this License.\ \ c) If the modified program normally reads commands interactively when run, you must cause it, when\ started running for such interactive use in the most ordinary way, to print or display an announcement\ including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you\ provide a warranty) and that users may redistribute the program under these conditions, and telling the\ user how to view a copy of this License. (Exception: if the Program itself is interactive but does not\ normally print such an announcement, your work based on the Program is not required to print an\ announcement.)\ \ These requirements apply to the modified work as a whole. If identifiable sections of that work are not\ derived from the Program, and can be reasonably considered independent and separate works in\ themselves, then this License, and its terms, do not apply to those sections when you distribute them as\ separate works. But when you distribute the same sections as part of a whole which is a work based on\ the Program, the distribution of the whole must be on the terms of this License, whose permissions for\ other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\ \ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you;\ rather, the intent is to exercise the right to control the distribution of derivative or collective works based on\ the Program.\ \ In addition, mere aggregation of another work not based on the Program with the Program (or with a work\ based on the Program) on a volume of a storage or distribution medium does not bring the other work under\ the scope of this License.\ \ 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or\ executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:\ \ a) Accompany it with the complete corresponding machine-readable source code, which must be\ distributed under the terms of Sections 1 and 2 above on a medium customarily used for software\ interchange; or,\ \ b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no\ more than your cost of physically performing source distribution, a complete machine-readable copy of the\ corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium\ customarily used for software interchange; or,\ \ c) Accompany it with the information you received as to the offer to distribute corresponding source code.\ (This alternative is allowed only for noncommercial distribution and only if you received the program in\ object code or executable form with such an offer, in accord with Subsection b above.)\ \ The source code for a work means the preferred form of the work for making modifications to it. For an\ executable work, complete source code means all the source code for all modules it contains, plus any\ associated interface definition files, plus the scripts used to control compilation and installation of the\ executable. However, as a special exception, the source code distributed need not include anything that is\ normally distributed (in either source or binary form) with the major components (compiler, kernel, and so\ on) of the operating system on which the executable runs, unless that component itself accompanies the\ executable.\ \ If distribution of executable or object code is made by offering access to copy from a designated place,\ then offering equivalent access to copy the source code from the same place counts as distribution of the\ source code, even though third parties are not compelled to copy the source along with the object code.\ \ 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under\ this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will\ automatically terminate your rights under this License. However, parties who have received copies, or\ rights, from you under this License will not have their licenses terminated so long as such parties remain in\ full compliance.\ \ 5. You are not required to accept this License, since you have not signed it. However, nothing else grants\ you permission to modify or distribute the Program or its derivative works. These actions are prohibited by\ law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work\ based on the Program), you indicate your acceptance of this License to do so, and all its terms and\ conditions for copying, distributing or modifying the Program or works based on it.\ \ 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically\ receives a license from the original licensor to copy, distribute or modify the Program subject to these\ terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights\ granted herein. You are not responsible for enforcing compliance by third parties to this License.\ \ 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not\ limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise)\ that contradict the conditions of this License, they do not excuse you from the conditions of this License. If\ you cannot distribute so as to satisfy simultaneously your obligations under this License and any other\ pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a\ patent license would not permit royalty-free redistribution of the Program by all those who receive copies\ directly or indirectly through you, then the only way you could satisfy both it and this License would be to\ refrain entirely from distribution of the Program.\ \ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance\ of the section is intended to apply and the section as a whole is intended to apply in other circumstances.\ \ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to\ contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free\ software distribution system, which is implemented by public license practices. Many people have made\ generous contributions to the wide range of software distributed through that system in reliance on\ consistent application of that system; it is up to the author/donor to decide if he or she is willing to\ distribute software through any other system and a licensee cannot impose that choice.\ \ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this\ License.\ \ 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by\ copyrighted interfaces, the original copyright holder who places the Program under this License may add\ an explicit geographical distribution limitation excluding those countries, so that distribution is permitted\ only in or among countries not thus excluded. In such case, this License incorporates the limitation as if\ written in the body of this License.\ \ 9. The Free Software Foundation may publish revised and/or new versions of the General Public License\ from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail\ to address new problems or concerns.\ \ Each version is given a distinguishing version number. If the Program specifies a version number of this\ License which applies to it and "any later version", you have the option of following the terms and\ conditions either of that version or of any later version published by the Free Software Foundation. If the\ Program does not specify a version number of this License, you may choose any version ever published by\ the Free Software Foundation.\ \ 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions\ are different, write to the author to ask for permission. For software which is copyrighted by the Free\ Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our\ decision will be guided by the two goals of preserving the free status of all derivatives of our free software\ and of promoting the sharing and reuse of software generally.\ \ NO WARRANTY\ \ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE\ PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\ STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE\ PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,\ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\ FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF\ THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE\ COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\ \ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY\ COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE\ PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR\ INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA\ BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\ FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH\ HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\ \ END OF TERMS AND CONDITIONS\ }edenmath.app-1.1.1a/GNUmakefile0000644000175000017500000000135010033530320016523 0ustar brentbrent00000000000000include $(GNUSTEP_MAKEFILES)/common.make PACKAGE_NAME = EdenMath VERSION = 1.1.0 APP_NAME = EdenMath GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_LOCAL_ROOT)/ EdenMath_APPLICATION_ICON = EdenMath.tiff EdenMath_MAIN_MODEL_FILE = MainMenu.gorm EdenMath_HEADERS = \ EMController.h \ EMResponder.h EdenMath_OBJC_FILES = \ EMController.m \ EMResponder.m \ main.m EdenMath_RESOURCE_FILES = \ EdenMath.tiff \ EdenMath_LANUAGES = English EdenMath_LOCALIZED_RESOURCE_FILES = \ MainMenu.gorm ADDITIONAL_OBJCFLAGS = -Wall -Wno-import -include GNUmakefile.preamble -include GNUmakefile.local include $(GNUSTEP_MAKEFILES)/aggregate.make include $(GNUSTEP_MAKEFILES)/application.make -include GNUmakefile.postamble edenmath.app-1.1.1a/.DS_Store0000755000175000017500000003000410063366707016160 0ustar brentbrent00000000000000Bud1 gifIlocbl  @ @ @ @10x.gifIlocblobP10x.gifinfoblob0ڨ Credits.rtfIlocblob Credits.rtfinfoblob0{  EdenMath.icnsIlocblob EdenMath.icnsinfoblob0ĬEdenMath.pbprojIlocblobPkEdenMath.pbprojinfoblob0mEMController.hIlocblobkEMController.hinfoblob0EEMController.mIlocblobkEMController.minfoblob0گ; EMResponder.hIlocblobP EMResponder.hinfoblob0E EMResponder.mIlocblob EMResponder.minfoblob0L English.lprojIlocblob English.lprojinfoblob0ھex.gifIlocblobPex.gifinfoblob0٪M HelpIlocblobHelpicspblobHelpinfoblob0Pmain.mIlocblobmain.minfoblob0Exy.gifIlocblobPgxy.gifinfoblob0ڧu  E DSDB ` @ @ @0ھex.gifIlocblobPex.gifinfoblob0٪M HelpIlocblobHelpicspblobHelpinfoblob0Pmain.mIlocblobmain.minfoblob0Exy.gifIlocblobPgxy.gifinfoblob0ڧu edenmath.app-1.1.1a/English.lproj/0000755000175000017500000000000010070205631017175 5ustar brentbrent00000000000000edenmath.app-1.1.1a/English.lproj/MainMenu.gorm/0000755000175000017500000000000010070202301021640 5ustar brentbrent00000000000000edenmath.app-1.1.1a/English.lproj/MainMenu.gorm/xy.tiff0000644000175000017500000000111210070202106023150 0ustar brentbrent00000000000000II*xڅQ!E@k(4*jTj4 #j4Q$Dm0{fnnv=D_' C̲ Ea}m8eYu]$ <9-˂}zqE]Fi0 vG"뺌m<:u \Kp(\_Է8냦irGn,$I;'MS F# t:fwTUU<:,ns< r9>/M .6 }:NEš)rMhtۭy8pX|,$EQ^OrRpHL&G0|>{.䞲d'1+ݻxtO| 量toa ^   f kpx(1:=R10x.tiffHHImageMagick 5.5.7 12/26/03 Q16 http://www.imagemagick.orgedenmath.app-1.1.1a/English.lproj/MainMenu.gorm/ex.tiff0000644000175000017500000000110610070202106023127 0ustar brentbrent00000000000000II*xڍ-DPm3( h~8QSE F4"Xk֚03nKDi,KdY&u4MA0,vafb UU(̰y|W\O& C^|Ìad&$99<'#P]\Gt]GycYuMӀ3˲x1<ӶmhcrAQ!     (1: =Rex.tiffHHImageMagick 5.5.7 12/26/03 Q16 http://www.imagemagick.orgedenmath.app-1.1.1a/English.lproj/MainMenu.gorm/data.classes0000644000175000017500000001216410070202301024134 0ustar brentbrent00000000000000{ EMController = { Actions = ( "off:", "clear:", "cut:", "copy:", "paste:", "undoAction:", "digitButton:", "period:", "pi2:", "pi3_2:", "pi:", "pi_2:", "pi_3:", "pi_4:", "pi_6:", "e:", "enter:", "add:", "subtract:", "multiply:", "divide:", "reverse_sign:", "percentage:", "mod:", "EE:", "squared:", "cubed:", "exponent:", "square_root:", "cubed_root:", "xroot:", "ln:", "logarithm:", "factorial:", "powerE:", "power10:", "inverse:", "setDegree:", "setRadian:", "setGradient:", "sine:", "cosine:", "tangent:", "arcsine:", "arccosine:", "arctangent:", "permutation:", "combination:", "random_num:", "checkForNewVersion:", "goToProductPage :", "goToFeedbackPage:" ); Outlets = ( ); Super = NSObject; }; FirstResponder = { Actions = ( "activateContextHelpMode:", "alignCenter:", "alignJustified:", "alignLeft:", "alignRight:", "arrangeInFront:", "cancel:", "capitalizeWord:", "changeColor:", "changeFont:", "checkSpelling:", "close:", "complete:", "copy:", "copyFont:", "copyRuler:", "cut:", "delete:", "deleteBackward:", "deleteForward:", "deleteToBeginningOfLine:", "deleteToBeginningOfParagraph:", "deleteToEndOfLine:", "deleteToEndOfParagraph:", "deleteToMark:", "deleteWordBackward:", "deleteWordForward:", "deminiaturize:", "deselectAll:", "fax:", "hide:", "hideOtherApplications:", "indent:", "loosenKerning:", "lowerBaseline:", "lowercaseWord:", "makeKeyAndOrderFront:", "miniaturize:", "miniaturizeAll:", "moveBackward:", "moveBackwardAndModifySelection:", "moveDown:", "moveDownAndModifySelection:", "moveForward:", "moveForwardAndModifySelection:", "moveLeft:", "moveRight:", "moveToBeginningOfDocument:", "moveToBeginningOfLine:", "moveToBeginningOfParagraph:", "moveToEndOfDocument:", "moveToEndOfLine:", "moveToEndOfParagraph:", "moveUp:", "moveUpAndModifySelection:", "moveWordBackward:", "moveWordBackwardAndModifySelection:", "moveWordForward:", "moveWordForwardAndModifySelection:", "newDocument:", "ok:", "openDocument:", "orderBack:", "orderFront:", "orderFrontColorPanel:", "orderFrontDataLinkPanel:", "orderFrontFontPanel:", "orderFrontHelpPanel:", "orderFrontStandardAboutPanel:", "orderFrontStandardInfoPanel:", "orderOut:", "pageDown:", "pageUp:", "paste:", "pasteAsPlainText:", "pasteAsRichText:", "pasteFont:", "pasteRuler:", "performClose:", "performMiniaturize:", "performZoom:", "print:", "raiseBaseline:", "revertDocumentToSaved:", "runPageLayout:", "runToolbarCustomizationPalette:", "saveAllDocuments:", "saveDocument:", "saveDocumentAs:", "saveDocumentTo:", "scrollLineDown:", "scrollLineUp:", "scrollPageDown:", "scrollPageUp:", "scrollViaScroller:", "selectAll:", "selectLine:", "selectNextKeyView:", "selectParagraph:", "selectPreviousKeyView:", "selectText:", "selectText:", "selectToMark:", "selectWord:", "showContextHelp:", "showGuessPanel:", "showHelp:", "showWindow:", "stop:", "subscript:", "superscript:", "swapWithMark:", "takeDoubleValueFrom:", "takeFloatValueFrom:", "takeIntValueFrom:", "takeObjectValueFrom:", "takeStringValueFrom:", "terminate:", "tightenKerning:", "toggle:", "toggleContinuousSpellChecking:", "toggleRuler:", "toggleToolbarShown:", "toggleTraditionalCharacterShape:", "transpose:", "transposeWords:", "turnOffKerning:", "turnOffLigatures:", "underline:", "unhide:", "unhideAllApplications:", "unscript:", "uppercaseWord:", "useAllLigatures:", "useStandardKerning:", "useStandardLigatures:", "yank:", "zoom:", "off:", "clear:", "undoAction:", "zeroButton:", "oneButton:", "twoButton:", "threeButton:", "fourButton:", "fiveButton:", "sixButton:", "sevenButton:", "eightButton:", "nineButton:", "period:", "pi:", "e:", "enter:", "add:", "subtract:", "multiply:", "divide:", "reverse_sign:", "percentage:", "mod:", "EE:", "squared:", "cubed:", "exponent:", "square_root:", "cubed_root:", "xroot:", "ln:", "logarithm:", "factorial:", "powerE:", "power10:", "inverse:", "setDegree:", "setRadian:", "setGradient:", "sine:", "cosine:", "tangent:", "arcsine:", "arccosine:", "arctangent:", "permutation:", "combination:", "random_num:" ); Super = NSObject; }; }edenmath.app-1.1.1a/English.lproj/MainMenu.gorm/objects.gorm0000644000175000017500000007212310070202301024164 0ustar brentbrent00000000000000GNUstep archive00002a96:00000020:0000030b:00000002:01GSNibContainer1NSObject01NSMutableDictionary1 NSDictionary&01NSString& %  MenuItem3301 NSMenuItem0&% Info0&&&%01NSImage0&% common_2DCheckMark0 0 & %  common_2DDash2submenuAction:%0 1NSMenu0 1 NSMutableArray1 NSArray&0 0& %  Info Panel...0&&&% %00&% Help...0&% ?&&% %00&% EdenMath0 &00&% Edit0&&&% %00 &00&% Cut0&% x&&% %00&% Copy0 &% c&&% %0!0"&% Paste0#&% v&&% %0$0%& %  Select All0&&% a&&% %0'0(&% Windows0)&&&% %0*(0+ &0,0-&% Arrange In Front0.&&&% %0/00&% Miniaturize Window01&% m&&% %0203& %  Close Window04&% w&&% %0506&% Hide07&% h&&% 2 hide:v12@0:4@8%0809&% Quit0:&% q&&% %0;&% Button250<1 NSButton1 NSControl1 NSView1 NSResponder% CN B B0 A  B0 A&0= &%0>1 NSButtonCell1 NSActionCell1NSCell0?&% -0@1NSFont%&&&&&&&&%0A&0B&&&&0C& %  MenuItem340D&% Button260E % C B B0 A  B0 A&0F &%0G0H&% 6@&&&&&&&&%0I&0J&&&&0K& %  MenuItem35'0L&% Button270M % B B B0 A  B0 A&0N &%0O0P&% 5@&&&&&&&&%0Q&0R&&&&0S& %  MenuItem360T0U&% Services0V&&&% %0WU0X &0Y&% Button280Z % Bl B B0 A  B0 A&0[ &%0\0]&% 4@&&&&&&&&%0^&0_&&&&0`& %  MenuItem3750a&% Button290b % C C/ B A  B A&0c &%0d0e&% Sin@&&&&&&&&%0f&0g&&&&0h& %  MenuItem38 0i& %  MenuItem390j&% NSMenu0k& %  GormNSMenu 0l& %  MenuItem80$0m& %  MenuItem81,0n& %  MenuItem82/0o& %  MenuItem180p& %  MenuItem8320q& %  MenuItem20r& %  MenuItem8480s& %  MenuItem3 0t& %  MenuItem40u&%NSOwner0v& %  NSApplication0w& %  MenuItem860x0y&% Check For Updates...0z&&&% %0{& %  MenuItem50|& %  My Window0}1NSWindow%  C Cv&% C DV0~ %  C Cv  C Cv&0 &2201 NSTextField% A CT Cp A  Cp A&0 &%01NSTextFieldCell0&% 00% A@&&&&&&&&%01NSColor0&%NSNamedColorSpace0&% System0&% textBackgroundColor00& %  textColor0 % B C; B A  B A&0 &%00&% Radian00&% common_RadioOff&&&&&&&&%0&0&00&% common_RadioOn&&&0 % C C; B A  B A&0 &%00&% Gradient&&&&&&&&%0&0&&&&0 % A C B0 A  B0 A&0 &%00&% C&&&&&&&&%0&0&&&&0 % CN B B0 A  B0 A&0 &%00&% x@&&&&&&&&%0&0&&&&0 % C B B0 A  B0 A&0 &%00&% 9@&&&&&&&&%0&0&&&&0 % B B B0 A  B0 A&0 &%00&% 8@&&&&&&&&%0&0&&&&0 % Bl B B0 A  B0 A&0 &%00&% 7@&&&&&&&&%0&0&&&&0 % A B B0 A  B0 A&0 &%00&% Mod@&&&&&&&&%0&0&&&&0 % CN C B0 A  B0 A&0 &%00±&% @&&&&&&&&%0ñ&0ı&&&&0ű % C C B0 A  B0 A&0Ʊ &%0DZ0ȱ&% %@&&&&&&&&%0ɱ&0ʱ&&&&0˱ % B C B0 A  B0 A&0̱ &%0ͱ0α&% @&&&&&&&&%0ϱ&0б&&&&0ѱ % Bl C B0 A  B0 A&0ұ &%0ӱ0Ա&% e@&&&&&&&&%0ձ&0ֱ&&&&0ױ % A B B0 A  B0 A&0ر &%0ٱ0ڱ&% EE@&&&&&&&&%0۱&0ܱ&&&&0ݱ % CN A  B0 A  B0 A&0ޱ &%0߱0&% =@&&&&&&&&%0&0&&&&0 % C A  B0 A  B0 A&0 &%00&% @&&&&&&&&%0&0&&&&0 % B A  B0 A  B0 A&0 &%00&% .@&&&&&&&&%0&0&&&&0 % Bl A  B0 A  B0 A&0 &%00&% 0@&&&&&&&&%0&0&&&&0 % A A  B0 A  B0 A&0 &%00&% Off@&&&&&&&&%0&0&&&&0 % CN B, B0 A  B0 A&0 &%00&% +@&&&&&&&&%0&P&&&&P % C B, B0 A  B0 A&P &%PP&% 3@&&&&&&&&%P&P&&&&P % B B, B0 A  B0 A&P &%P P &% 2@&&&&&&&&%P &P &&&&P % Bl B, B0 A  B0 A&P &%PP&% 1@&&&&&&&&%P&P&&&& % Cŀ C/ B A  B A&P? &%P@PA&% Tan&&&&&&&&%PB&PC&&&&PD % Cŀ CP B A  B A&PE &%PFPG&% Rand&&&&&&&&%PH&PI&&&&PJ % C A  B A  B A&PK &%PLPM&% 10^xPN A A@0PO &PP4 A A@%%% PQ&II*kkksss{{{kkkJJJ111{{{{{{cccccc))){{{)))cccJJJ!!!111cccRRRccc))):::  R&&&&&&&&%PR&PS&&&&PT % C B, B A  B A&PU &%PVPW&% Log&&&&&&&&%PX&PY&&&&PZ % C B B A  B A&P[ &%P\P]&% 3"&&&&&&&&%P^&P_&&&&P` % C B B A  B A&Pa &%PbPc&% x&&&&&&&&%Pd&Pe&&&&Pf % C C B A  B A&Pg &%PhPi&% Arccos&&&&&&&&%Pj&Pk&&&&Pl % C C/ B A  B A&Pm &%PnPo&% Cos&&&&&&&&%Pp&Pq&&&&Pr % C CP B A  B A&Ps &%PtPu&% nCr&&&&&&&&%Pv&Pw&&&&Px % C A  B A  B A&Py &%PzP{&% e^xP| AP A00P} &P~4 AP A0%% % P&II*DkkkssskkkJJJ{{{BBB{{{)))111kkk)))cccJJJ::::::::::::BBBBBBJJJ!!!   <R&&&&&&&&%P&P&&&&P % C B, B A  B A&P &%PP&% Ln&&&&&&&&%P&P&&&&P % C B B A  B A&P &%PP&% "&&&&&&&&%P&P&&&&P % C B B A  B A&P &%PP&% x&&&&&&&&%P&P&&&&P % Cŀ A  B A  B A&P &%PP&% 1/x&&&&&&&&%P&P&&&&P1NSMatrix% A C; Cm A  Cm A&P &%*PP&@&&&&&&&&%% B A PP&% SystemP&% controlBackgroundColorP& %  NSButtonCellPP&% Degree&&&&&&&&%P&P&&&&%%P &PP&% Degree&&&&&&&&% &&&PP&% Radian&&&&&&&&% &&&PP&% Gradient&&&&&&&&%&&&P % A B, B0 A  B0 A&P &%PP&% %%ĐP%P&% ArialUnicodeMS A@A@&&&&&&&&%P&P&&&&PP&% SystemP&% windowBackgroundColorP&% WindowP&% EdenMath ? B F@ F@%PP&%NSApplicationIconP& %  MenuItem87P& %  MenuItem6P& %  MenuItem88P& %  MenuItem7P& %  MenuItem89!P& %  MenuItem8!P±& %  MenuItem9$Pñ&% Button30Pı& %  NSVisiblePű &}PƱ&% Button31PDZ& %  MenuItem40Pȱ&% Button32%Pɱ& %  MenuItem41Pʱ&% Button33+P˱& %  MenuItem42!P̱&% Button348Pͱ& %  MenuItem43$Pα&% Button35>Pϱ& %  MenuItem44,Pб&% Button36DPѱ& %  MenuItem45/Pұ&% Button37JPӱ& %  MenuItem462PԱ&% Button38TPձ& %  MenuItem47Pֱ&% Button39ZPױ& %  MenuItem48Pر& %  MenuItem49!Pٱ& %  MenuItem90$Pڱ& %  MenuItem91,P۱& %  NSWindowsMenu*Pܱ& %  MenuItem92/Pݱ& %  MenuItem932Pޱ& %  MenuItem948P߱&% Button40`P&% Button41fP& %  MenuItem50$P&% Button42lP& %  MenuItem51,P&% Button43rP& %  MenuItem52/P&% Button44xP& %  MenuItem532P&% Button45P& %  MenuItem54P& %  MenuItem55P& %  TextFieldP&% Button46P& %  MenuItem56!P&% Button47P& %  MenuItem57$P&% Button48P& %  MenuItem58,P& %  MenuItem59/P& %  MenuItem10TP& %  MenuItem11'P& %  MenuItem12,P& %  MenuItem13/P& %  GormNSMenu10P& %  MenuItem142P&% Button1P& %  GormNSMenu11*P& %  MenuItem15P&% Button2P& %  GormNSMenu12WP& %  MenuItem16P&% Button3P& %  GormNSMenu13 P& %  MenuItem17'P&% Button4P& %  GormNSMenu14P& %  MenuItem18TP&% Button5P& %  GormNSMenu15*P& %  MenuItem195P&% Button6P & %  GormNSMenu16WP & %  GormNSMenu17 P &% Button7P & %  GormNSMenu18P &% Button8P& %  GormNSMenu19*P&% Button9P&% ButtonP& %  MenuItem602P& %  MenuItem61P& %  MenuItem62P& %  MenuItem63!P& %  MenuItem64$P& %  MenuItem65,P& %  MenuItem66/P& %  MenuItem672P& %  MenuItem688P&% MenuItem5P& %  MenuItem69P&% Button10P&% Button11P& %  MenuItem208P&% Button12P & %  MenuItem21P!&% Button13P"& %  MenuItem22P#&% Button14P$& %  MenuItem23'P%& %  GormNSMenu20WP&&% Button15P'& %  MenuItem24TP(&% Button16P)& %  MenuItem255P*& %  EMControllerP+1 GSNibItem*  &P,&% Button17P-& %  MenuItem268P.&% Button18P/& %  MenuItem27P0&% Button19P1& %  MenuItem28P2& %  MenuItem29'P3& %  GormNSMenu1P4&% MatrixP5& %  GormNSMenu2WP6& %  GormNSMenu3*P7&% GSCustomClassMapP8&P9& %  GormNSMenu4 P:& %  GormNSMenu5 P;& %  MenuItem70P<& %  GormNSMenu6P=& %  MenuItem71!P>& %  GormNSMenu7*P?& %  MenuItem72$P@& %  MenuItem73,PA& %  GormNSMenu9 PB& %  MenuItem74/PC& %  MenuItem752PD& %  MenuItem768PE& %  MenuItem77PF& %  MenuItem78PG& %  MenuItem79!PH&% Button20PI&% Button21PJ& %  MenuItem315PK&% Button22PL&% Button23 PM& %  MenuItem328PN &PO1NSNibConnector|PP&%NSOwnerPQjPPRJjPSMjPT됐PUPVPWPXPPYPPZPP[ PP\ PP]PP^PP_PP`PPa!PPb&PPc(PPd,PPe.PPf0PPgHPPhIPPiKPPjLPPk;PPlDPPmLPPnYPPo#PpaPPqPPrPPsPPtPPuPPvPPwPPxPPyPPzPP{PP|PP}PP~PPPPPPPPPPPP*PP1NSNibOutletConnectorP*P&% delegateP*P& %  displayFieldP1 NSNibControlConnector*P& %  setRadian:P *P& %  setGradient:P *P&% clear:P  *P&% mod:P !*P&% EE:P 0*P&% off:P *P&% e:P *P&% pi:P ,*P&% period:P *P& %  percentage:P (*P& %  reverse_sign:P *P&% divide:P *P& %  multiply:P ;*P& %  subtract:P H*P&% add:P &*P&% enter:P *P& %  permutation:P *P& %  combination:P *P& %  random_num:P a*P&% sine:P *P&% cosine:P *P&% tangent:P #*P&% arcsine:P *P& %  arccosine:P *P& %  arctangent:P *P&% squared:P *P&% cubed:P *P& %  exponent:P *P±& %  square_root:Pñ *Pı& %  cubed_root:Pű *PƱ&% xroot:PDZ *Pȱ&% ln:Pɱ *Pʱ& %  logarithm:P˱ *P̱& %  factorial:Pͱ *Pα&% powerE:Pϱ *Pб&% power10:Pѱ *Pұ&% inverse:Pӱ|*PԱ&% delegatePձ/jPֱA/PױsAPر{APٱ1jPڱ<1P۱E2P@>PB>PC>P4PPP sP&%NSFirstP&% orderFrontStandardInfoPanel:P EP&% cut:P FP&% copy:P GP&% paste:P ?P& %  selectAll:P @P&% arrangeInFront:P BP&% performMiniaturize:P CP& %  performClose:P .*P& %  digitButton:P L*P K*P I*P Y*P L*P D*P  *P *P *P MP& %  terminate: