Questions tagged [underflow]

An arithmetic underflow is a condition in a computer program where the result of a calculation is a number of smaller absolute value than the computer can actually represent in memory.

In computing, buffer underrun or buffer underflow is a state occurring when a buffer used to communicate between two devices or processes is fed with data at a lower speed than the data is being read from it. This requires the program or device reading from the buffer to pause its processing while the buffer refills.

From Wikipedia

148 questions
0
votes
1 answer

Underflow in the root of a B-Tree

I am trying to implement a 3-4-5-6 Tree. In the event that a merge causes the root to have only one key (underflow) and its children have a total number of key greater than 5 (so if all merged together, an underflow would happen), what should…
Lenny
  • 1
  • 1
0
votes
1 answer

Likelihood involving very small numbers

I have a large vector of likelihoods all in the range (0 to 1) but all numbers are quite a bit less than 1. I need to compute the maximum likelihood of the product of these vectors. How can I avoid underflow, my fitter is failing in all my…
Canuck
  • 567
  • 1
  • 7
  • 15
0
votes
1 answer

c++ casting to byte (unit8_t) during subtraction won't force underflow like I expect; output is int16_t; why?

Note that byte is an 8-bit type (uint8_t) and unsigned int is a 16-bit type (uint16_t). The following doesn't produce the results that I expect. I expect it to underflow and the result to always be a uint8_t, but it becomes a signed int (int16_t)…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
0
votes
1 answer

Python: Do pandas.DataFrame.comprod() and numpy.comprod() handle numerical underflow?

Specifically, are these cumulative product functions in pandas and numpy implemented in a robust way to handle underflow when multiplying lots of small numbers together? For example, are they using the log-sum-exp trick? Thanks.
WillZ
  • 3,775
  • 5
  • 30
  • 38
0
votes
1 answer

C++ underflow example?

I'm currently taking an introductory C++ class and the professor gave us the following example: unsigned int TEST = -1; cout << TEST; Now, on his machine, TEST is returned as the maximum value for an integer, because he forced underflow. But on my…
ohitsanazn
  • 238
  • 1
  • 3
  • 12
0
votes
1 answer

Buffer underrun and ResourceExhausted errors with tensorflow

I'm in high school and I'm trying to do a project involving neural networks. I am using Ubuntu and trying to do reinforcement learning with tensorflow, but I consistently get lots of underrun warnings when I train a neural network. They take the…
0
votes
2 answers

taking number parts in R (rescale small numbers using log function)

I want to represent the following number using the log function: 2.5e-600/1.7e-500 here is what I did on paper, and what I would like to automate on R for any given number: log(2.5e-600/1.7e-500) = log(2.5e-600)-log(1.7e-500) …
Imlerith
  • 479
  • 1
  • 7
  • 15
0
votes
0 answers

Representing floating-point underflow in program output

I have done a thorough search but only seem to find explanations of what underflow is, and how it works, rather than ways to represent it. Long story short, I'm writing a program to experiment with integer overflow, floating-point overflow (inf) and…
Gabriel Saul
  • 63
  • 1
  • 9
0
votes
1 answer

java stack Underflow

im work this assignment and keep getting Exception in thread "main" java.lang.RuntimeException: Stack Underflow at Stack.pop(Postfix.java:74) at Postfix.eval(Postfix.java:221)at Postfix.main(Postfix.java:112) dont know why i look at the stack and…
tommy
  • 11
  • 1
  • 5
0
votes
1 answer

Elapsed time of unsigned wrapping timer

Consider I have a timer that returns a uint32_t value (representing a number of ticks), always counts upwards, and wraps to 0 after reaching UINT32_MAX. Suppose I need to take an elapsed time from time a to time b, and I don't know how high the…
user553702
  • 2,819
  • 5
  • 23
  • 27
0
votes
0 answers

Java Stack Underflow Error: Evaluating Postfix

I am trying to evaluate each postfix values that were changed from infix equations. I have to use 5 classes: Driver, InfixToPostfix, EvalPostfix, ObjectStack, ObjectInterface. The program works fine when changing infix to postfix but I can't…
0
votes
0 answers

cPickle : stack underflow error

I have a directory of 170,000+ pickle files in multiple subdirectories which were originally pickled using the (protocol=0) format. This hasn't been very efficient time or space-wise. I wrote a script to re-pickle (using cPickle, protocol=2) each…
HuckleberryFinn
  • 1,489
  • 2
  • 16
  • 26
0
votes
1 answer

Two's Complement binary addition

I have a program that adds 2 two's complement binary numbers and spits out the output. They are read from a file as the first binary number being in two's complement. The second binary number being in biased notation. To change form biased to two's…
user3325783
0
votes
1 answer

Underflow in Matlab

Is it a good practice to manually set numbers with large negative exponential like 1e-300 to zero to avoid underflow in Matlab? If not how can we avoid harm of underflow when implementing functions like log(1+exp(x))?
user25004
  • 1,868
  • 1
  • 22
  • 47
0
votes
0 answers

Java overflow and underflow , why no error or exception?

Why Java creators decided not to throw any error or exception when overflow or underflow hapens considering the fact that such scenarios are usually lethal for any software.
Praveen Kumar
  • 1,624
  • 5
  • 18
  • 21
1 2 3
9
10