### [WP] (issue7): describe tow potential problems

parent eb09c535
 ... @@ -25,11 +25,24 @@ multiplication of the samples with the mpc factors. For this reason for any ... @@ -25,11 +25,24 @@ multiplication of the samples with the mpc factors. For this reason for any exponent (except exponent being exactly zero) a division by zero takes place exponent (except exponent being exactly zero) a division by zero takes place for zero-offset traces. for zero-offset traces. The exepction might by just by chance. How is zero to the power of zero The exception might by just by chance. How is zero to the power of zero defined? defined? From the man page of the pow-function: From the man page of the pow-function: - The pow() function returns the value of x raised to the power of y. - The pow() function returns the value of x raised to the power of y. - If y is 0, the result is 1.0 (even if x is a NaN). - If y is 0, the result is 1.0 (even if x is a NaN). We potentially face two problems: - When using the zero offset (least offset) trace as a reference for offset dependent scaling (as is the default), a division by zero happens in subroutine mpcfactors. - Zero offset traces may come with an mpc-scaling factor equal to zero. This means, the trace should be down-scaled to a straight line in any case. The current concept of trace scaling does this by leaving the sample values of the trace as they are, by using a viewport for the trace according to current clipping (derived in function settracevp) and by setting the world coordinates for the trace's viewport appropriately (i.e. to infinity). In the latter step there happens the nasty division by zero (division by mpc factor). This problem is present, even is the zero offset trace is not used as a reference. ----- END OF issue7_refract_catch_zero_offset.txt ----- ----- END OF issue7_refract_catch_zero_offset.txt -----
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment