Say I have the following:
1. x = value between 0.0000001 and 0.9999999
2. x = 1 + x
3. x = tangent of x
4. x = x % 1
5. repeat steps 2 to 4 ten times
6. show new value of x
Is there a way to revert this calculation ?
%1 is the 'modulus arithmetic operator', the remainder after the
division by (in this case) 1.
Thank you
--
Bart
Reversing it looks like it will be very hard. For example, you have
x_10 = tan(1 + x_9) % 1
which means that
x_9 = arctan(k + x_10) + m pi - 1
for some integers k and m. The fact that x_9 has to lie between 0 and 1
implies that m can only be 0 or 1. If m=0, then you need to have:
arctan(k + x_10) > 1
while if m=1 then we need:
arctan(k + x_10) < 2 - pi
There are infinitely many integers k that satisfy either inequality.
--
Daniel Mayost
In article <1161422971....@k70g2000cwa.googlegroups.com>,
Since steps 3 and 4 are non-injective, it can't be
uniquely reverted.
Actually, the calculation isn't well-defined; for
example, at x = pi/2 - 1, ie .570796..., the result
of step 3 isn't finite.
-jiw
> Bart Van der Donck wrote:
> ...
> > 1. x = value between 0.0000001 and 0.9999999
> > 2. x = 1 + x
> > 3. x = tangent of x
> > 4. x = x % 1
> > 5. repeat steps 2 to 4 ten times
> > 6. show new value of x
> >
> > Is there a way to revert this calculation ?
A unique reverse is not necessary; it would be enough that it results
in 'some' value that can be used again to perform the initial
calculation (it should serve in computer code).
> Since steps 3 and 4 are non-injective, it can't be
> uniquely reverted.
>
> Actually, the calculation isn't well-defined; for
> example, at x = pi/2 - 1, ie .570796..., the result
> of step 3 isn't finite.
I can't have PI because x is (another) calculated result from an
earlier function with character input. x is in the form "0.NS" where NS
is a finite number of digits.
Thanks again
--
Bart