Slow and strange double multiplication in GCC

Revision en2, by GGOSHAB, 2023-01-29 00:13:08

Hello! Not so far I've solved a geometry problem. I was need to multiplicate some integers, but first time I did it with doubles and my solution got TLE. Than I changed doubles to long long and it got AC. Than I started some experiments and set type of numbers to doubles again and changed GNU C++17 compiler to MSVC and it also got AC. And now I'm confused with it. Adding #pragma GCC optimize("Ofast")(which includes "fast-math") doesn't help. Can you explain what is it and is it possible to make doubles working on GCC faster?(I need it bc MSVC ignores ios::sync_with_stdio(0);)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English GGOSHAB 2023-01-29 00:13:08 0 (published)
en1 English GGOSHAB 2023-01-29 00:13:00 637 Initial revision for English translation (saved to drafts)
ru1 Russian GGOSHAB 2023-01-29 00:12:20 637 Первая редакция (опубликовано)