From: Jeff E. <cv...@cv...> - 2008-11-07 21:49:58
|
Modified file emc2/src/hal/components/comp.comp Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/comp.comp?rev=1.12> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/comp.comp.diff?r1=1.11;r2=1.12> Branch: TRUNK Log: revision 1.12 date: 2008/11/07 21:49:53; author: jepler; state: Exp; lines: +2 -2 no reason to lose precision by using floats for temporaries and internal state --- comp.comp 2008/02/10 19:39:39 1.11 +++ comp.comp 2008/11/07 21:49:53 1.12 @@ -16,8 +16,8 @@ license "GPL"; ;; FUNCTION(_) { - float tmp = in1 - in0; - float halfhyst = 0.5 * hyst; + double tmp = in1 - in0; + double halfhyst = 0.5 * hyst; if(tmp < -halfhyst) { out = 0; Modified file emc2/src/hal/components/invert.comp Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/invert.comp?rev=1.3> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/invert.comp.diff?r1=1.2;r2=1.3> Branch: TRUNK Log: revision 1.3 date: 2008/11/07 21:49:53; author: jepler; state: Exp; lines: +1 -1 no reason to lose precision by using floats for temporaries and internal state --- invert.comp 2008/08/12 13:59:41 1.2 +++ invert.comp 2008/11/07 21:49:53 1.3 @@ -29,7 +29,7 @@ #include <rtapi_math.h> FUNCTION(_) { - float tmp = in; + double tmp = in; if (deadband < 1e-12) deadband = 1e-12; if ( tmp > -deadband && tmp <0) out = -1/deadband; Modified file emc2/src/hal/components/knob2float.comp Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/knob2float.comp?rev=1.4> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/knob2float.comp.diff?r1=1.3;r2=1.4> Branch: TRUNK Log: revision 1.4 date: 2008/11/07 21:49:53; author: jepler; state: Exp; lines: +2 -2 no reason to lose precision by using floats for temporaries and internal state --- knob2float.comp 2007/04/25 16:27:19 1.3 +++ knob2float.comp 2008/11/07 21:49:53 1.4 @@ -33,12 +33,12 @@ typedef struct { long old_counts; - float old_out; + double old_out; } knob2float_data; FUNCTION(_) { long delta_counts; - float tmp_out; + double tmp_out; if ( min_out > max_out ) { min_out = max_out; Modified file emc2/src/hal/components/limit2.comp Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/limit2.comp?rev=1.7> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/limit2.comp.diff?r1=1.6;r2=1.7> Branch: TRUNK Log: revision 1.7 date: 2008/11/07 21:49:53; author: jepler; state: Exp; lines: +1 -1 no reason to lose precision by using floats for temporaries and internal state --- limit2.comp 2008/11/04 17:36:55 1.6 +++ limit2.comp 2008/11/07 21:49:53 1.7 @@ -9,7 +9,7 @@ license "GPL"; ;; -typedef struct { float old_out; } limit2_data; +typedef struct { double old_out; } limit2_data; #ifndef clamp static inline double clamp(double v, double sub, double sup) { Modified file emc2/src/hal/components/wcomp.comp Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/wcomp.comp?rev=1.4> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/hal/components/wcomp.comp.diff?r1=1.3;r2=1.4> Branch: TRUNK Log: revision 1.4 date: 2008/11/07 21:49:53; author: jepler; state: Exp; lines: +1 -1 no reason to lose precision by using floats for temporaries and internal state --- wcomp.comp 2008/09/11 16:44:21 1.3 +++ wcomp.comp 2008/11/07 21:49:53 1.4 @@ -11,7 +11,7 @@ license "GPL"; ;; FUNCTION(_) { -float tmp = in; + double tmp = in; under = (tmp <= min_); over = (tmp >= max_); out = !(over || under); |