Literal
-0.0##
under NegativeLiterals+MagicHash yields positive 0.0##
.
Optimization
Constant folding
Fragile to negative zero and infinity and NaN (LitFloat
/LitDouble
cannot express them). cf. #9811, #18897.
\documentclass{article} | |
\usepackage{amsmath} | |
\usepackage{luacode} | |
\begin{document} | |
\begin{luacode*} | |
local M = require "expr" | |
function diff(expr, var) | |
local result = M.parse(expr) | |
if result.tag == "Ok" then | |
local e = M.simplify(M.diff(var)(result.payload)) |
local assert = assert | |
local error = error | |
local getmetatable = getmetatable | |
local pairs = pairs | |
local pcall = pcall | |
local setmetatable = setmetatable | |
local math = math | |
local math_abs = math.abs | |
local math_type = math.type | |
local math_maxinteger = math.maxinteger |
#include <cblas_openblas.h> | |
#include <stdio.h> | |
#include <math.h> | |
int main(void) | |
{ | |
double A[3][3] = { | |
{1.0, 2.0, 3.0}, | |
{2.0, 3.0, 4.0}, | |
{4.0, 5.0, 6.0}, |
#include <M5Stack.h> | |
#include <utility/M5Timer.h> | |
const int SHUTTER_PIN = 12; | |
const int FOCUS_PIN = 5; | |
const int LEVER_UP = 13; | |
const int LEVER_PUSH = 0; | |
const int LEVER_DOWN = 34; |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeOperators, NoStarIsType #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-} | |
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-} | |
module Sing where | |
import qualified Data.Singletons.Prelude as S |
// Written by @mod_poppo | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <mpfr.h> | |
#include <gmp.h> | |
static void to_normalized_hex(char *buf, mpfr_t a, int mant) | |
{ | |
// assume a is positive |
// ==UserScript== | |
// @name AtCoder Code Prettify | |
// @namespace https://miz-ar.info/ | |
// @include https://atcoder.jp/contests/*/submissions/* | |
// @version 3 | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
console.debug("AtCoder Code Prettify is running"); |
#include <stdint.h> | |
#include <float.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <fenv.h> | |
#pragma STDC FENV_ACCESS ON | |
#if defined(__x86_64__) && defined(__GNUC__) | |
#define HAS_X87 | |
static void set_x87_prec_24(void) |
#include <stdio.h> | |
#include <math.h> | |
#include <inttypes.h> | |
#if defined(__GNUC__) | |
#define NOINLINE __attribute__((noinline)) | |
#else | |
#define NOINLINE | |
#endif |