Skip to content

Instantly share code, notes, and snippets.

View alfanick's full-sized avatar
💭
I may be slow to respond.

Amadeusz Leonardo Juskowiak alfanick

💭
I may be slow to respond.
View GitHub Profile
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
@alfanick
alfanick / abstract.md
Last active August 17, 2016 16:19
Funny doubles behaviour
clang++ clang++/fast-math g++ g++/fast-math
Naive 36028796817637376 36028796884746240 36028796817637376 36028796884746240
Naive OpenMP 36028796884746240 36028796884746240 36028796884746240 36028796884746240
Vectorization 36028796884746240 36028796884746240 - -

Correct answer -- 36028796884746240

  • clang++ -- clang++ -march=native -O3 -std=c++11 -fopenmp -L/usr/local/opt/llvm/lib -o main ./main.cpp
  • clang++/fast-math -- clang++ -march=native -O3 -std=c++11 -fopenmp -ffast-math -L/usr/local/opt/llvm/lib -o main ./main.cpp