332 questions
2 votes
0 answers
115 views
Implementing Arbitrary Precision Arithmetic in CubeCL for Infinite Zoom Fractals
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 ...
1 vote
1 answer
60 views
Does the binary representation of a fixnum include a sign bit?
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 ...
0 votes
0 answers
41 views
Eigen 3.4 cannot find mpreal.h?
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 ...
0 votes
0 answers
32 views
How to constructing rational values with Flint ARB
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" ...
0 votes
2 answers
198 views
Why 5.0 / 2 returns 2.5000000000000000 (scale of 16) instead of 2.5 (scale of 1)?
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 ...
1 vote
1 answer
64 views
Boost multiprecision library
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 ...
0 votes
0 answers
47 views
Confused with matlab arbitrary precision toolboxes
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 ...
0 votes
1 answer
44 views
Represent tiny numbers in Matlab using sym and vpa
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^(-...
2 votes
3 answers
162 views
A faster way of comparing arrays of integers lexicographically
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 ...
0 votes
1 answer
65 views
mpmath and mathmatica discrepancy in output
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....
3 votes
1 answer
402 views
Can AVX-512 be used to calculate the multiplication of two 256-bit Integers on a 64 bit computer in C++? Whether using Assembly Language or not
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 ...
-1 votes
2 answers
240 views
Calculating the fixed-point representation of (1 - SQRT(0.5)) to arbitrary levels of precision
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 ...
0 votes
0 answers
72 views
why Java BigDecimal giving Precision Errors
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&...
1 vote
1 answer
288 views
How to force Julia to use multiple threads for matrix multiplication?
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 ...
2 votes
1 answer
85 views
Use VPA to evaluate tiny probabilities
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=...