Python Forum
Can Python be used for this???? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Can Python be used for this???? (/thread-25701.html)



Can Python be used for this???? - Jack_Ritter - Apr-08-2020

Can anyone tell me if this can be done in Python before I try to pursue this?

I need to be able to input two partially known factors each at 15 decimal places exactly and the product answer at 29 decimal places exactly. The beginning numbers (0.199848... and 4.97438...) of the two factors must remain unchanged during the program run. The zero's in each factor are what Python must work with and "numerically change". This "numerical change", when the factors are multiplied, must yield the product ‭0.99412293432154732337566954206 to 29 decimals and no less in order to match my product input. I would like to know what the final factors are along with the matching product once Python gets finished running.

Example:

My Input
Factor 1---> 0.199848000000000 ‭
Factor 2---> 4.974380000000000
Product ---> ‭0.99412293432154732337566954206

Output:
What the output should hopefully be --> 0.199848442087413 X 4.974384208042620 = ‭0.99412293432154732337566954206

So in conclusion, Python would find out what the factors must be to match my input of the known product ‭0.99412293432154732337566954206 that I gave it. I think Python might use a combination/permutation on the zero's until it finds a combination that yields the product I input.


RE: Can Python be used for this???? - buran - Apr-08-2020

(Apr-08-2020, 06:30 PM)Jack_Ritter Wrote: Can anyone tell me if this can be done in Python before I try to pursue this?

if you know/can describe how to do it on paper with pencil (i.e. write the algorithm), then you can do it with python