Skip to content

Instantly share code, notes, and snippets.

@BSVino
Created August 14, 2016 03:29
Show Gist options
  • Select an option

  • Save BSVino/a0101a063ba5600078b34259fb501a65 to your computer and use it in GitHub Desktop.

Select an option

Save BSVino/a0101a063ba5600078b34259fb501a65 to your computer and use it in GitHub Desktop.
#include "stdafx.h"
#include <emmintrin.h>
#include <limits>
int main(int argc, const char** args)
{
_controlfp(~_EM_INVALID, _MCW_EM);
double doubles[] = { 5, std::numeric_limits<double>::quiet_NaN() };
return (int)exp(_mm_cvtsd_f64(_mm_load_pd(doubles)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment