I have an extremely large math calculation for a python cgi art project that I am working on. The python code runs for days loading database info then making thousands of floating point multiplications and divisions iteratively. It is producing different output with no random functions or other changing inputs. I am using pandas databases. Is it ever possible that a CPU error or some other issue creates math output variance on such a large scale? I went over it many times and can't see why the same logic math and input does not produce the same result every time it is run. Can floating point math ever produce different results? Can cpus produce math errors or variance?
Can a Python program produce varying outputs from the same input
90 views Asked by user2224727 At
1
There are 1 answers
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in MATH
- How to restrict vpasolve() to only integer solutions (MATLAB)
- Need clarification on VHDL expressions involving std_logic_vector, unsigned and literals, unsure about compiler interpretation
- What is the algorithm behind math.gcd and why it is faster Euclidean algorithm?
- How to throw a charged particle in a electric vector field?
- Issues with a rotation gizmo and sign flips when converting back to euler angles
- Solving the area of a 2 dimensional shape
- WorldToScreen function
- Algorithm to find neighbours of point by distance with no repeats
- Detecting Circles and Ellipses from Point Arrays in Java
- three parameter log normal distribution
- Bound for product of matrices
- Javascript animation taking incorrect amount of time to reach desired location
- Converting Math.js-like Expressions to Runnable Python Code
- Looking for a standard mathematical function that returns 0 if x = 0 and a constant k when x <> 0
- Partitions in co-lexicographic order (PARI/GP algorithm without recursion)
Related Questions in FLOATING
- How to make Scaffold floatingActionButton not clickable through
- How to receive a float array using esp8266 via I2c
- A way to change Groovy default behavior with numbers
- How Can I float a log in and sign up link or button to the right of the page?
- VS used to point in solution explorer to a hyperlink or anything to make mapping easier
- What float value is associated with each character?
- How to place a sticky element above other elements without impacting their dimensions
- Pass a string variable in a loop within in a pipe in R for the mutate function
- Combining integer and float parts of a number in C++
- Floating point exception (core dumped) need help identifying where potential error is
- Odoo 16 Float Field default value
- Dropdown-Menu - Floating Form Button
- Input Form Floating Label does not work, when "required" is removed
- Cannot call 'ta.sma' with argument 'length'='smoothD'. An argument of 'input float' type was used but a 'series int' is expected
- Do context switches in the kernel include code to save the context of the floating point as a general rule of thumb?
Related Questions in CG
- I was following Computer Graphics from Scratch -- Getting distorted spheres
- Defining Lagrange linear basis function (P1) on P2 isoparametric triangular element
- Unity Custom Shader Cannot Update Property In Code
- Slurm jobs are running, but there is no output or errors
- the direction strength of corner-pin
- How make shader for dashed outline of rounded rectangle?
- 3D volume rendering : fence-like artifact
- Chroma key with OpenCL and Lode's QuickCG
- Can a Python program produce varying outputs from the same input
- Why is my shader working in the Scene View but not in the Game View (Unity) (Built-in Render Pipeline)?
- Convert custom unity shader to URP
- Sprite outline effect appears one frame later
- Is there any way to set length of integer array with variable in hlsl?
- Where can I find the source code for NVIDIA's Cg toolkit?
- Space curvature bending in Unity3D as Post Effect/Image Effect
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Short answer: Yes, it's theoretically possible.
Real answer: But that's almost certainly not what's happening here (even for huge datasets, the odds of such an issue on any given run are tiny, so if you've run three times and the output has differed every time, either it's not cosmic ray bit flips, or you're a walking break in probability and should definitely go play the lottery). You have a bug, or you've introduced randomness or varying input data that you are unaware of.
For example, even without calling random functions, modern Python will have some randomness introduced, specifically into the hashing behavior for things that can be hashed as a series of bytes (
bytesitself,str,datetime.datetime, etc.). Whiledicts have been insertion-ordered since 3.7 (3.6 as implementation-detail),sets are still arbitrarily ordered, and the ordering will change from run-to-run for any type using a seeded hashing scheme. If your code is assumingsets have a reproducible, meaningful order, and rely on that in some way, your runs could in fact change even if every other aspect of your code and inputs was deterministic.Floating point math is order-sensitive as well; while purely deterministic code should do the floating point math in the same order, low-level high performance libraries might thread large batches of work, introducing non-determinism. And of course, if the
sets mentioned earlier get involved, and their ordering determines the order of floating point math (floatitself does not use a seeded hash, but a seeded hash type could influencefloatoperation ordering depending on what you're doing), that will get some reliable non-determinism.Of course, with code as huge as what you're doing, you might be using threading for a speed-up, and that would cause similar issues if you have any form of races.