8
8
8Yurasik82015-12-21 16:06:13
Java
8Yurasik8, 2015-12-21 16:06:13

Where exactly will floating point math be performed in Java or C++?

There is a need to write a program that will count the matrix elements of which will be floating point numbers. I decided to implement the code in Java or C++. In this regard, the question arose where mathematical operations with floating point numbers would be more accurate. Thanks in advance.
PS If you know a PL that is more suitable for this purpose, then please share the information.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander, 2015-12-21
@8Yurasik8

The accuracy will be the same, it does not depend on the language, but on the data type,
see float and double data types

D
Danil Akhtarov, 2015-12-21
@danil_sport

It all depends on the processor. Intel calculates better on integer type, and AMD on floating point

L
LNK, 2015-12-21
@NikHaker

On c ++, the functionality is more convenient there.

J
jackroll, 2015-12-21
@jackroll

Implementation dependent

N
Noortvel, 2015-12-21
@Noortvel

No difference. Precision and floating point are a bad combination.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question