Skip to main content

Questions tagged [floating-point]

For challenges which are specific to numbers represented in floating-point format.

13 votes
8 answers
1k views

You will be given a decimal number n in the form of a string. You must determine if that number, when stored in standard number type ...
Ted's user avatar
  • 2,407
3 votes
2 answers
557 views

Output \$20\$ float64s with absolute value between 1 and 2 inclusive whose sum has the largest possible relative error. We can assume the true sum is not zero. The sum is to be computed from left to ...
Simd's user avatar
  • 3,177
13 votes
14 answers
5k views

In many programming languages, the floating-point value NaN, or "not a number", in some programming languages generated by the expression ...
3-1-4-One-Five's user avatar
16 votes
3 answers
2k views

Input Integer \$n > 1\$ Output Ten 64 bit floating point numbers between \$-n\$ and \$n\$, inclusive, whose sum is the least accurate. Details and examples. These examples are not claimed to be ...
Simd's user avatar
  • 3,177
18 votes
21 answers
3k views

There is a challenge for multiplying two numbers so I guess this counts too Given as input a positive real number n compute its natural logarithm. Your answer ...
mousetail's user avatar
  • 14.5k
11 votes
4 answers
867 views

There was a previous perceptron question but it was closed. Also it required a lot of extra stuff that's not normally part of the perception algorithm like I know it. This question will be much ...
mousetail's user avatar
  • 14.5k
20 votes
21 answers
8k views

The task is simple: given a 32 bit integer, convert it to its floating point value as defined by the IEEE 754 (32-bit) standard. To put it another way, interpret the integer as the bit-pattern of an ...
zoomlogo's user avatar
  • 1,665
8 votes
2 answers
315 views

Level-index is a system of representing numbers which has been proposed as an alternative to floating-point formats. It claims to virtually eliminate overflow (and underflow, in its symmetric form) ...
att's user avatar
  • 22.9k
18 votes
22 answers
1k views

We don't have a challenge for conversion between Cartesian and polar coordinates, so ... The challenge Write two programs (or functions) in the same language: one that converts from polar to ...
Luis Mendo's user avatar
  • 107k
10 votes
9 answers
610 views

Introduction Time is a really simple concept. Seconds pass, one after the other, all the same. But humans love making it hard. This Stackoverflow question has gathered many answers and even though ...
Jean-Pierre Höhmann's user avatar
21 votes
14 answers
3k views

This is different from Floating Point XOR, and more in the spirit of a comment by R.. GitHub STOP HELPING ICE on that challenge, but I thought of this idea independently. Generalized XOR The bitwise ...
Ovinus Real's user avatar
10 votes
13 answers
1k views

...
AZTECCO's user avatar
  • 11k
8 votes
6 answers
807 views

Background So, nowadays the popular Prisoner's Dilemma variant is the Prisoner's Trilemma, where there are three options. I can easily see that being increased, so I figured Why settle for three ...
4D4850's user avatar
  • 189
5 votes
21 answers
1k views

In speedcubing, an Ao5 (Average of 5) is computed for a set of five times by removing the fastest and slowest times, and then computing the mean of the remaining three times. A "rolling ao5" ...
qwr's user avatar
  • 12.5k
26 votes
8 answers
2k views

Ash has a bit of an interesting float division algorithm. It's designed to never return NaN, and things like signed zero and infinity need to be handled. How it ...
rydwolf's user avatar
  • 19.4k

15 30 50 per page