Skip to content

Instantly share code, notes, and snippets.

View Thar0l's full-sized avatar

Aleksey Gusarov Thar0l

  • Milandr
  • Moscow
View GitHub Profile
@Thar0l
Thar0l / display.ino
Last active February 13, 2016 16:25
Test code for TIC55 lcd
#define CLC 4
#define DATA 3
#define LOAD 2
//http://micrus.ru/pdf/TIC55.pdf
//346501287
//degfabchp
//phcbafged
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <limits>
#include <math.h>
#include <omp.h>
const int R = 12;
@Thar0l
Thar0l / math1-2.cpp
Last active December 18, 2015 09:30
#include <iostream>
#include <cmath>
#include <limits>
#include <omp.h>
const int R = 10;
const int N = pow(2, R);
const double h = (1.0 / N);
const double eps = 0.000001;
const double bmin = 0.0;
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <math.h>
double f(double x)
{
if (x == 0.0) return 0.0;
return sin(1/x);
def print_table(self):
for line in self.table:
print line
def print_table(self):
for line in self.table:
print line
def calc(self, x):
result = 0.0
for i in range (0, self.size):
prod = 1.0;
for j in range(0, i):
prod *= (x-self.points[j])
result += self.coefs[i] * prod
return result