All pastes #2059533 Raw Edit

Unnamed

public text v1 · immutable
#2059533 ·published 2011-05-14 22:05 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>

int main (int argc, char **argv) {
	float x = strtof(argv[1], NULL);
	printf("input %s, interpreted as %19.17f\n", argv[1], x);
	printf("%19.17f\n", sqrtf(x));

	assert( (x != 0.0f && sqrtf(x) != 0.0f)	|| (x == 0.0f && sqrtf(x) == 0.0f) );
	return 0;
}