#include <stdio.h>
#include "show_bytes.h"
#include <math.h>

int main(){

	float zero = 0.;
	
	printf("1.0 / 0 = %f\n", 1.0/zero);
	printf("1.0 / -0 = %f\n", 1.0/-zero);
	printf("sqrt(-1) = %f\n", sqrt(-1));

	printf("\n");

	if (1.0 / zero == INFINITY) { // Access Infinity via math.h library
		printf("Woah, infinity... that's deep, man...\n\n");
	}

	float pi = 3.14;
	float ten_gs = 1e10;

	printf("(%f + %f) - %f = %f\n", pi, ten_gs, ten_gs, (pi+ten_gs)-ten_gs);
	printf("%f + (%f - %f) = %f\n", pi, ten_gs, ten_gs, pi+(ten_gs-ten_gs));

	printf("\n");

	float huge = 1e20;
	float teeny = 1e-20;

	printf("(%f * %f) *%f = %f\n", huge, huge, teeny, (huge*huge)*teeny);
	printf("%f * (%f *%f) = %f\n", huge, huge, teeny, huge*(huge*teeny));

	printf("\n");

	printf("%f * (%f - %f) = %f\n", huge, huge, huge, huge * (huge-huge));
	printf("%f * %f - %f * %f = %f\n", huge, huge, huge, huge, huge * huge - huge * huge);
}
