Skip to main content
Filter by
Sorted by
Tagged with
2 votes
0 answers
120 views

Context I'm implementing a Julia set fractal renderer using CubeCL (a Rust GPU compute framework). I want to achieve "infinite zoom" similar to deep Mandelbrot zoom videos, which requires ...
Marco Fanelli's user avatar
1 vote
1 answer
62 views

TL;DR: In Emacs Lisp, is the sign of a fixnum part of its binary representation or stored in some metadata? What's the distinction between positive and negative fixnums? Can the sign be switched in ...
vmonteco's user avatar
  • 15.9k
0 votes
0 answers
42 views

I am writing a program called moments++ (https://github.com/gvbarroso/momentspp). This program uses Eigen 3.4. Some scenarios lead to precision issues in the matrices (using long double). Thus, I want ...
gvbarroso's user avatar
0 votes
0 answers
32 views

I have the following code where I try to use fmpz_t to prime factor rationales of a system constant. /* gcc -I/usr/local/include/flint -o arb arb.c -lflint */ # include "arb.h" ...
artless-noise-bye-due2AI's user avatar
0 votes
2 answers
200 views

Fiddle select 5.0 / 2 , pg_typeof(5.0 / 2); pg_typeof 2.5000000000000000 numeric Why the result is 2.5000000000000000? When we insert 2.5 into a numeric column or select 2.5 from a numeric column ...
Bek's user avatar
  • 27
1 vote
1 answer
64 views

Boost multiprecision libraries highest value possible Can the boost multiprecision handle values as large as googolplex , like maybe the boost multiprecision cpp dec float library? So can someone ...
Divye Sharma's user avatar
0 votes
0 answers
47 views

I have a recursive computation code of mine (containing only simple +, *, exp, etc arithmetic on complex valuated numbers) that starts to loose precision when increasing the depth of iterations and I ...
CitizenInsane's user avatar
0 votes
1 answer
44 views

I need to store some really tiny positive and negative numbers in Matlab. One way is to store their signs separately, and the log10 of their magnitude, which lets me store numbers as small as 10^(-...
Abhranil Das's user avatar
  • 5,956
2 votes
3 answers
164 views

I'm currently writing an arbitrary precision library for fun (yes, I know that GMP exists) and I'm using it to generate large prime numbers (~5000 digits) with the Miller-Rabin primality test. I ...
Andrew Kornder's user avatar
0 votes
1 answer
68 views

edited because my main issue lies with incorrect results from mp.math. I need to eventually do very precise calculations with complex numbers, which is why I am trying to use the mp module from mp....
SFtigs's user avatar
  • 3
3 votes
1 answer
409 views

Regarding arbitrary precision arithmetic: Can AVX-512 be used to calculate the multiplication of two 256-bit Integers on a 64-bit computer in C++? Is there an intrinsic Integer data type of 512 bits ...
Snowy Owl's user avatar
-1 votes
2 answers
240 views

I have a constant 0.29289321881345247559915563789515..., which can be calculated using the equation (1 - SQRT(0.5)) and then transformed into fixed-point format in order to be used with various sizes ...
Kittoes0124's user avatar
  • 5,102
0 votes
0 answers
77 views

i am using java big decimal. but still i am not getting expected result.. public class DecimalAdjustEx { public static void main(String[] args) { BigDecimal v1 = new BigDecimal("100&...
srikanth m's user avatar
1 vote
1 answer
294 views

I want to find powers of a relatively small matrix, but this matrix consists of rational numbers of type Rational{BigInt}. By default, Julia utilizes only a single thread for such computations. I want ...
Yrogirg's user avatar
  • 2,403
2 votes
1 answer
88 views

For a statistics application, I need to evaluate tiny chi-square probabilities. But when this becomes smaller than matlab's double-precision limit realmin (around 1e-308), it returns 0. x=50; p=...
Abhranil Das's user avatar
  • 5,956
0 votes
4 answers
352 views

I'm not familiar with modern JS and tooling to even try something. References: https://github.com/tc39/proposal-bigint
user894319twitter's user avatar
-1 votes
1 answer
123 views

Background: usually floating-point arithmetic is implemented using integer arithmetic (for example, Berkeley SoftFloat). Per ARM pseudocode [1] floating-point arithmetic is implemented using infinite ...
pmor's user avatar
  • 6,777
1 vote
1 answer
210 views

I did an evaluation of mpmath and sympy and found inconsistencies, which I cannot resolve. I believe mpmath gives correct results. Please, can somebody help in resolving this? import sympy as sp ...
Samson's user avatar
  • 123
2 votes
1 answer
201 views

I have a while loop that calculates the roots of my equation. It works perfectly when I am working with low numbers, for example 100, the precision is a little more than 250 decimal places (I need 250 ...
Willian Andrade's user avatar
2 votes
0 answers
94 views

I am trying to obtain the value of an incomplete gamma function with complex arguments, to be precise I am interested in obtaining Gamma[0, a + i*b] for real parameters a,b. I'm using mpfr in C++ for ...
Lucas's user avatar
  • 21
1 vote
2 answers
2k views

How can a u128 be converted to an array of u64s. While passing a u128 to an API which takes arbitrary precision int, the API takes 3 parameters LLVMValueRef LLVMConstIntOfArbitraryPrecision ( ...
A. K.'s user avatar
  • 39.3k
0 votes
2 answers
285 views

Problem statement: I am working on a code that calculates big numbers. Hence, I am easily get beyond the maximum length of "long double". Here is an example below, where part of the code is ...
physics-lab's user avatar
0 votes
1 answer
2k views

I was wondering how Postgresql converts floating point (float4) values to NUMERIC. I chose 0.1 as a testing value. This value is not accurately representable in base2, see https://float.exposed/...
user1068464's user avatar
-2 votes
2 answers
469 views

I got large HEX string in result into int i could be more than 10 ^ 30, and I converted in hex. I need sum (3 hex string) and remove last 12 numbers. hex example "...
Aeroxer Support's user avatar
-1 votes
1 answer
1k views

I want to represent extended integers and came across _BitInt() but it doesn't work dynamically. I'm trying to do something like this: void fun(int n) { _BitInt(n)* val = malloc(n); //doesn't work ...
Abdulmalek Almkainzi's user avatar
0 votes
1 answer
150 views

I need to do arbitrary precision math in PHP. But the bcmath implementation doesn't seem to have ways to convert between decimal and binary/hex. I need to take an arbitrary precision number WITH RADIX ...
vasten's user avatar
  • 1
0 votes
0 answers
165 views

Does anyone know an algorithm for a Pow2() function for fractions? For a function of the following form, where BigRational stands for any rational number type, with arbitrarily large integers for ...
Christian Ohle's user avatar
0 votes
0 answers
187 views

My aim is to use GSL monte carlo integration for an integrand in which an arbitrary multiprecision library (Boost) is used. I decided to use an arbitrary multiprecision library because the integral ...
CafféSospeso's user avatar
0 votes
1 answer
473 views

I am writing a mandelbrot-calculator with the help of gpu.js and till now, everything works perfectly fine. The only issue I am facing is, that the GPU only wants to compute 32-Bit floats. Or at least ...
Dominik Lovetinsky's user avatar
3 votes
1 answer
1k views

In Go/Golang I have a variable of type big.Float with an (arbitrary) precision of 3,324,000 to represent a decimal number of 1,000,000 digits. It's the result of an iteration to calculate pi. Now I ...
tux4u2's user avatar
  • 43
10 votes
2 answers
4k views

I'm currently doing a primality test on huge numbers (up to 10M digits). Right now, I'm using a c program using the GMP library. I did some parallelization using OpenMP and got a nice speedup (3.5~ ...
Caio's user avatar
  • 137
4 votes
1 answer
91 views

The problem arose while I was working with Mods.jl. This package does not support arbitrary-precision arithmetic because only primitive types can be passed as parameters, i.e. Mod{17} works fine, but ...
Paul Dydyshko's user avatar
0 votes
1 answer
511 views

Imagine to have some vectors (could be a torch tensor or a numpy array) with a huge number of components, each one very small (~ 1e-10). Let's say that we want to calculate the norm of one of these ...
user1172131's user avatar
2 votes
1 answer
496 views

How does Java's BigInteger divide work internally? I did a ton of research and I can't find anything. So instead, I did some research into how CPUs do division, and looked into stuff like restoring/...
Joe C.'s user avatar
  • 501
1 vote
1 answer
956 views

I want a function like this: >>> binary128_to_hex("1.0") '3fff0000000000000000000000000000' I currently use C and qemu-aarch64 to do this on my x86 laptop. How can I implement such ...
warm_ice's user avatar
1 vote
0 answers
80 views

I have a power series with all terms non-negative which I want to evaluate to some arbitrarily set precision p (the length in binary digits of a MPFR floating-point mantissa). The result should be ...
user2373145's user avatar
1 vote
0 answers
241 views

I am working on an unsigned arbitrary precision integer class in C++, just as an exercise for myself. While running some benchmarks (calculating the Fibonacci sequence at some number) I noticed that ...
Aaron Barge's user avatar
2 votes
1 answer
221 views

I would like to use FM package capabilities for the study of a problem in number theory. I installed the package, compiled libraries, and ran the two test suites supplied, all without any problems. I ...
Tommy R. Jensen's user avatar
2 votes
1 answer
230 views

I continue with my exploration on the Num library of Ocaml, with the reason that one whole library about logics was written using it. Today, I would like to make the negative of a rational number. ...
Theo Deep's user avatar
  • 786
1 vote
1 answer
260 views

from GNU gawk's page https://www.gnu.org/software/gawk/manual/html_node/Checking-for-MPFR.html they have a formula to check arbitrary precision function adequate_math_precision(n) { return (1 != (1+(...
RARE Kpop Manifesto's user avatar
1 vote
0 answers
257 views

I have written a Big Integer class that works well. I want to write a Big Decimal class. I've structure the class as a float with a base 10 exponent--i.e. in the form of M*10^e where 10^0 implies the ...
Kris B.'s user avatar
  • 73
0 votes
1 answer
128 views

I'm having an issue with BigDecimals, the simplified idea is to: define a value for the total split the total in 3 parts defined by weights, these weights are 3 double values that add up to 100.0 sum ...
Pablo Fernandez's user avatar
1 vote
1 answer
139 views

I am currently writing a program that is heavy on finite differencing. The problem is that to get the accuracy I'd need, I need to use arbitrary precision arithmetic. I have a purely Python script ...
Sean Fortuna's user avatar
1 vote
1 answer
166 views

I am currently working on an application that requires, the usage of arbitrary large precision real numbers to calculate pi to a very large precision range. I've found MPFR an amazing library highly ...
Aravind A's user avatar
  • 486
3 votes
1 answer
163 views

I found the Arb library, which should be able to compute very high precision values of sine, given enough time. However, I am unable to. Trying the sine example, I could get the predicted output. ...
Ritesh Singh's user avatar
-1 votes
2 answers
2k views

I want to convert data(double precision,15 decimal points) to data of another type(quadruple precision,34 decimal points). So, I used vpa function like this: data = sin(2*pi*frequency*time); quad_data ...
Hak-Min Lee's user avatar
2 votes
1 answer
173 views

I have large integers that I need to convert to binary, but I keep getting this warning message: Warning messages: In h(num) : probable complete loss of accuracy in modulus 2: In diff(x%%2^(...
Jared Scripture's user avatar
1 vote
2 answers
2k views

I have been using BigNumber.js library for high precision arithmetic calculation. To maintain higher precision I am using toFixed method of the Bignumber object like this: (new BigNumber(6000 )).minus(...
nraina's user avatar
  • 354
1 vote
1 answer
497 views

Suppose I have a binary floating point notation (e.g. 1001.011101) with arbitrary precision 2^(-n) after the floating point, how can I convert it to any base, say ternary or decimal. For the integer ...
farmerzhang1's user avatar
3 votes
1 answer
251 views

I am trying to write a program in Haskell that returns 'e' (Euler's number) to a given decimal place. Here is my code so far: factorial 0 = 1 factorial n = n * factorial (n - 1) calculateE a | a ...
Jack Bodine's user avatar

1
2 3 4 5
7