Skip to content

Instantly share code, notes, and snippets.

View marionette-of-u's full-sized avatar

arithmeticae marionette-of-u

View GitHub Profile
#include <iostream>
#include <functional>
#include <ginac/ginac.h>
namespace ExtGiNaC{
using namespace GiNaC;
namespace detail{
class exp_alternate_form{
public:
ex operator ()(const ex &expression){
#include <typeinfo>
#include <cxxabi.h>
#include <cstdlib>
class demangle{
private:
char *realname;
public:
demangle(const std::type_info &ti){
int status = 0;
pow(a, log2(a, x)) = a^log(a, x) = x = x
log2(a, x) + log2(a, y) = log(a, x)+log(a, y) = log(a, (y*x)) = \log(a, {( y x)})
log2(a, x) - log2(a, y) = log(a, x)-log(a, y) = log(a, (y^(-1)*x)) = \log(a, {(\frac{x}{y})})
log2(a, pow(x, b)) = log(a, x)*b = log(a, x)*b = \log(a, x) b
log2(a, 1 / x) = -log(a, x) = -log(a, x) = - \log(a, x)
log2(a, x) * log2(b, a) = log(a, x)*log(b, a) = log(b, x) = \log(b, x)
log2(b, a) * log2(a, x) = log(a, x)*log(b, a) = log(b, x) = \log(b, x)
log2(b, x) / log2(b, a) = log(b, a)^(-1)*log(b, x) = log(a, x) = \log(a, x)
1 / log2(x, a) = log(x, a)^(-1) = log(a, x) = \log(a, x)
log2(1 / a, x) = -log(x)*log(a)^(-1) = -log(x)*log(a)^(-1) = -\frac{\ln(x)}{\ln(a)}
#include "draw_wisp_ring.hpp"
#include "draw_radar.hpp"
#include "draw_set_screen_back.hpp"
#include "mainlist.hpp"
#include "drawlist.hpp"
namespace st0{
#define ST0_WRITE_T_BEGIN_END(type) \
template<> linklist_game_obj *mainlist_t_begin<type>(){ return mainlist.t_begin<type>().get_linklist(); } \
#ifndef MT_LIST_HPP
#define MT_LIST_HPP
#include <type_traits>
#include <utility>
#include <boost/iterator_adaptors.hpp>
namespace mt{
template<class T>
struct task_interface{
" autoload, https://github.com/mattn/lambda-vim
exe lambda#setup()
let s:test = {}
let s:fa = lambda#gen(s:, 'a:1 + a:2')
let s:fb = lambda#gen(s:, 'a:1 * 2 + a:2 * 2')
function! s:test.g(f)
typedef mt::list_generator<game_obj::signature> game_list_gen;
// ------------------------------
// シーンマネージャーリスト
// ------------------------------
typedef game_list_gen::list<
mt::task_interface<scene_obj>,
mt::task<stage_0, 1>
> scene_manager_list;
let s:token = { 'ast': 0, 'pls': 1, 'l_pare': 2, 'r_pare': 3, 'id': 4, 'token_0': 5 }
let s:stack = {}
function! s:stack.ctor()
let self.gap_ = 0
let self.tmp_ = []
let self.stack_ = []
endfunction
function! s:stack.reset_tmp()
<token_desc> token{
<left>{
ast;
pls;
}
l_pare, r_pare;
id<type_id>;
}
<grammar> grammar{
#include <deque>
#include <set>
#include <memory>
#include <algorithm>
#include <functional>
struct weight_dir{
enum{
left, up, bi, next,
} dir;