¥È¥Ã¥× «Á°¤ÎÆüµ­(2007-12-13) ºÇ¿· ¼¡¤ÎÆüµ­(2007-12-16)» ÊÔ½¸

¤Ï¤¸¤á¤Æ¤Î¤Ë¤­

¤³¤³¤Î°ÌÃÖÉÕ¤±

2004|11|
2005|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|04|05|06|07|08|09|10|11|

ToDo:


2007-12-15

_ ¤Ä¡¼¤ï¤±¤Ç

GolfScript ¤Ê¤ë flagitious ¤µ¤óºî¤Î ¸À¸ì¤ò¥´¥ë¥Õ¾ì¤Ë­¤·¤¿¤Î¤ÇÍ·¤ó¤Ç¤ß¤ë¤äÎɤ·¡£

¤¿¤Ö¤óÈܶ±¤Ê¤¯¤é¤¤¶¯¤¤¡£

(03:19)

_ ¥Ð¥Ã¥É¥Î¥¦¥Ï¥¦

ŬÅ٤ʥ¢¥ë¥³¡¼¥ë/¥Ð¥Ã¥É¥Î¥¦¥Ï¥¦¤ÏÎɤ¤¤¬¡¢ ²áÅÙ¤ÊÀݼè¤Ï¤¢¤Ê¤¿¤Î·ò¹¯¤ò»¤Ê¤¦¶²¤ì¤¬¤¢¤ê¤Þ¤¹¡£

(03:21)

_ libm

http://d.hatena.ne.jp/odz/20071214/1197622976

¤³¤Î¤Ø¤ó¤ò¸«¤¿¡£ ¥ª¥ê¥¸¥Ê¥ë¤Î¥³¡¼¥É¤¬ÊѤï¤Ã¤Æ¤ë¤ß¤¿¤¤¤À¤«¤éÆâÍƤϤ褯¤ï¤«¤Ã¤Æ¤Ê¤¤¡£ ¤½¤³¤Ç¤¢¤Þ¤ê´Ø·¸¤Ê¤¤Ïá£

#include <math.h>
int main() {
    return pow(3, 4);
}

¤¬

main:
        leal    4(%esp), %ecx
        andl    $-16, %esp
        pushl   -4(%ecx)
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ecx
        movl    $81, %eax
        popl    %ecx
        popl    %ebp
        leal    -4(%ecx), %esp
        ret

¤³¤¦¤Ê¤ë¡£ ¤³¤ì¤¬ __builtin ¤ÎËâÎϤ«¡ª ¤Æ¤« -O ¤È¤«¤Ä¤±¤ó¤¯¤Æ¤â¾Ã¤¨¤ë¤ó¤À¤Í¡£ pow(3.3, 4) ¤È¤«¤·¤Á¤ã¤¦¤È pow ¤¬¸Æ¤Ð¤ì¤Æ¤·¤Þ¤¦¡£

¤Ç -ffast-math ¤ò¤Ä¤±¤ë¤È

main:
        leal    4(%esp), %ecx
        andl    $-16, %esp
        pushl   -4(%ecx)
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ecx
        movl    $118, %eax
        popl    %ecx
        popl    %ebp
        leal    -4(%ecx), %esp
        ret

¤ï¤¤¤ï¤¤¡£

¤¢¤È¤Þ¤¡ pow(argc, 4) ¤È¤«¤Ç¤â -ffast-math ¤Ä¤±¤ì¤Ð call pow ¤Ï¾Ã¤¨¤ë¤«¤é ºÇŬ²½¤Ç pow ¤¬Â®¤¯¤Ê¤ë¤³¤È¤Ï¤Ê¤¤¤È¤¤¤¦¤ï¤±¤Ç¤â¤Ê¤¤¤È¤«¡£

TODO(¤­¤Ã¤È¤¢¤í¤Ï¤µ¤ó¤¬Ä´¤Ù¤ë¤È¤¤¤¦°ÕÌ£): ¤³¤ì GCC ¤Î¤É¤³¡© builtins.c ¤ÏÈù̯¤Ë°ã¤¤¤²¡£

(03:44)

_ ¤¢¤¢¤¤¤ä

builtins.c ¤«¡£

     /* Attempt to evaluate pow at compile-time.  */
     if (TREE_CODE (arg0) == REAL_CST
         && ! TREE_CONSTANT_OVERFLOW (arg0))
       {
         REAL_VALUE_TYPE x;
         bool inexact;
         x = TREE_REAL_CST (arg0);
         inexact = real_powi (&x, TYPE_MODE (type), &x, n);
         if (flag_unsafe_math_optimizations || !inexact)
       return build_real (type, x);
       }

¤³¤Î¤Ø¤ó¤«¤Í¡£

¤Ë¤·¤Æ¤â fold_builtin_pow ¤ÏÁêÅö¥¢¥Û¤Ê´¶¤¸¤ÊºÇŬ²½¤¬¤Û¤²¤Ã¤Æ¤ë¤Ê¤¡¡£

     /* Optimize pow(cbrt(x),y) = pow(x,y/3) iff x is nonnegative.  */
     if (BUILTIN_CBRT_P (fcode))
   {
     tree arg = TREE_VALUE (TREE_OPERAND (arg0, 1));
     if (tree_expr_nonnegative_p (arg))
       {
         const REAL_VALUE_TYPE dconstroot
       = real_value_truncate (TYPE_MODE (type), dconstthird);
         tree narg1 = fold_build2 (MULT_EXPR, type, arg1,
                   build_real (type, dconstroot));
         arglist = tree_cons (NULL_TREE, arg,
                  build_tree_list (NULL_TREE, narg1));
         return build_function_call_expr (fndecl, arglist);
       }
   }
     /* Optimize pow(pow(x,y),z) = pow(x,y*z).  */
     if (fcode == BUILT_IN_POW || fcode == BUILT_IN_POWF
      || fcode == BUILT_IN_POWL)
   {
     tree arg00 = TREE_VALUE (TREE_OPERAND (arg0, 1));
     tree arg01 = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg0, 1)));
     tree narg1 = fold_build2 (MULT_EXPR, type, arg01, arg1);
     arglist = tree_cons (NULL_TREE, arg00,
                  build_tree_list (NULL_TREE, narg1));
     return build_function_call_expr (fndecl, arglist);
   }

¤³¤ì¤È¤«¡£

(03:56)

_ DeFLaTe

http://www.jmuk.org/diary/2007/12/14/1

»÷¤¿¤è¤¦¤Ê¤³¤È¤¬ w3m ¤Çµ¯¤­¤Æ¤¿¤Î¤À¤±¤É ¤Ê¤ó¤« inflate ¤Ã¤Æ¥³¥Þ¥ó¥É̵¤¤¤È w3m ¤Î¾ì¹ç¥À¥á¤Ê¤ó¤«¤Ê¤È¤« ¥À¥á¤Ê¤ó¤«¤Ê¡¼¤È»×¤Ã¤Æ accept-encoding ¤«¤é deflate ³°¤·¤Æ¤«¤é µ¤ÉÕ¤¤¤¿¤ó¤À¤±¤É¡¢¤è¤¯¹Í¤¨¤ë¤È akr ¤µ¤ó¤È¤³ (http://cvs.m17n.org/~akr/diary/) ¤Ï ¸«¤¨¤Æ¤ë¤Î¤Ç¤¢¤Ã¤¿¤Î¤Ç¤Ê¤Ë¤«¤¬¤ª¤«¤·¤¤¡£

¤½¤ì¤Ï¤½¤¦¤È akr ¤µ¤ó¤È¤³¤Ï Accept-Encoding ¤Ë deflate ̵¤¯¤Æ¤â DeFLaTe ¤ÇÁ÷¤Ã¤Æ¤¯¤ë¤Î¤Ï¥¨¥°¤¤¤è¤¦¤Ê¡£

echo 'GET http://cvs.m17n.org/~akr/diary/ HTTP/1.0\r\nHost: cvs.m17n.org\r\n\r\n' | netcat cvs.m17n.org 80

http://www.ietf.org/rfc/rfc2616.txt

¤È¤«¤ò¸«¤Æ Accept-Coding: identity ¤òÁ÷¤Ã¤Æ¤ß¤ë¤âÄ̤¸¤º¡£¥à¥Í¥ó¡£

(04:25)

_ Common LISP

¤«¤ó¤É¤¦¤·¤¿

>>(defun f (&optional a b &key k) (list a b k))

F
>>(f 1 2)

(1 2 NIL)
>>(f 1 2 :k 3)

(1 2 3)
>>(f :k 3)

(:K 3 NIL)

(15:34)

_ ¤¤

>>(f :k 3 :k 3)

(:K 3 3)

(15:36)

_ return ¤È nil

gcl

>>(defun nil() (return 1))

NIL
>>(nil)

1

clisp

[1]> (defun nil () (return 1))
NIL
[2]> (nil)
1

sbcl

* (defun nil() (return 1))

debugger invoked on a SYMBOL-PACKAGE-LOCKED-ERROR in thread #<THREAD "initial thread" {A7BD3F9}>:
  Lock on package COMMON-LISP violated when setting fdefinition of NIL.
See also:
  The SBCL Manual, Node "Package Locks"
  The ANSI Standard, Section 11.1.2.1.2

(16:01)

_ disassemble

  • CLISP: byte code
  • GCL & SBCL: native

GCL ¤Ï¥¤¥ó¥¿¥é¥¯¥Æ¥£¥Ö¥â¡¼¥É¤Ç disassemble ¤·¤è¤¦¤È¤¹¤ë¤È¤¢¤ï¤Æ¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤«¤é objdump ¤·¤Æ¤ë´¶¤¸¡£

¤·¤«¤· objdump ¤ÏÆɤߤʤì¤Æ¤ë¤Î¤ÇÎɤ¤¡£

(17:26)

ËÜÆü¤Î¥Ä¥Ã¥³¥ß(Á´1·ï) [¥Ä¥Ã¥³¥ß¤òÆþ¤ì¤ë]
_ Ashykaju (2010-03-29 15:52)

¤³¤Î´Ö¤â½ÓÂÀϺ¤Î»í¤ò¤ª http://www.stlouisbusinesslist.com/business/5021837.htm?info=viagra generic viagra :DD

¤ªÌ¾Á°:
E-mail:
¥³¥á¥ó¥È:
¿ÍÀ¸¡¢±§Ãè¡¢¤¹¤Ù¤Æ¤ÎÅú¤¨
ËÜÆü¤Î¥ê¥ó¥¯¸µ

Á° 2007ǯ
12·î
¼¡
Æü ·î ²Ð ¿å ÌÚ ¶â ÅÚ
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
1.annoncelegale(2011-10-26 20:30) 2.annoncelegale(2011-10-10 05:12) 3.Jcftymkt(2010-03-29 15:56)
search / home / index

Á´¤Æ¥ê¥ó¥¯¥Õ¥ê¡¼¤Ç¤¹¡£ ¥³¡¼¥ÉÊҤϼ«Í³¤Ë»ÈÍѤ·¤Æ¤¤¤¿¤À¤¤¤Æ¹½¤¤¤Þ¤»¤ó¡£ ¤½¤Î¾¤Î¤â¤Î¤ÏGPL°·¤¤¤Ç¤¢¤ì¤Ð¤¢¤é¤æ¤ë»ÈÍѤ˴ؤ·¤Æʸ¶ç¤Ï¸À¤¤¤Þ¤»¤ó¡£ ¤Ê¤Ë¤«¤¢¤ì¤Ð²¼µ­¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ø¡£

shinichiro.hamaji _at_ gmail.com / shinichiro.h