File:Table log 001 100 cinq decimales.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 526 × 744 pixels, file size: 26 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
Français : Table des logarithmes népériens de 0.01 à 100 avec cinq décimales. Format A5 (ISO 216, 148.5 × 210 mm). Créé avec Scilab.
English: Table of the natural logarithm from 0.01 to 100 with six significant digits. Decimal mark: comma. A5 format (ISO 216, 148.5 × 210 mm, 5.8 × 8.3 in). Created with Scilab.
Date
Source Own work
Author Cdang
Other versions
 
W3C-validity not checked.

Scilab source

// valeurs

chemin = "C:\Dossier_de_travail\";
nomDeFichier = "Table_log_001_100_cinq_decimales.svg";

Npetits=0.01:0.01:1;
Ngrands=1:100;
nbcol=5;
nbligne = 100/nbcol;

// decimales = 2; // précision
decimales = 5; // précision
fd = 10^decimales; // facteur décimal
ifd = 1/fd; // inverse facteur décimal

logNpetits = strsubst(string(ifd*round(fd*log(Npetits))), ".", ",");
logNpetits = strsubst(logNpetits, "-", "–"); // tiret demi-cadratin
logNgrands = strsubst(string(ifd*round(fd*log(Ngrands))), ".", ",");

Npetits = strsubst(string(Npetits), ".", ",");

point = 25.4/72; // point pica en millimètres
corps = 8*point; // taille de caractères en mm
espace = 1; // 1 mm de gouttière et d'interligne
marge = 10; // 10 mm = 1 cm de marge

// Structure du fichier SVG

entete =["<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?>"
" "
"<!DOCTYPE svg PUBLIC ""-//W3C//DTD SVG 1.1//EN"" "
  " ""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"" "
">"
" "
"<svg"
"  width=""148.5mm"" height=""210mm"" version=""1.1"" "
"  xmlns=""http://www.w3.org/2000/svg"" "
"  xmlns:xlink=""http://www.w3.org/1999/xlink"" "
"  viewBox=""0 0 148.5 210"" "
"  font-family=""Arial"" font-size="""+string(corps)+""""
">"
" "
"  <title> Table de logarithmes népériens </title>"
"  <desc> Table de logarithmes népériens entre 0,01 et 100"
"    avec cinq décimales </desc>"
" "
];

finDeFichier = [" "
"</svg>"];

// ********************************
// * Contruire le premier tableau *
// ********************************

marge1 = marge + corps + espace

xdebut1 = marge + 2*espace; // à 10.1 cm du bord gauche
ydebut1 = marge1 + 3*espace + corps;
// largeurCol = 6*corps + 2*espace;
largeurCol = 8.5*corps + 2*espace;
hauteurLigne = corps + espace;

x11 = xdebut1 + largeurCol*[0:(nbcol-1)] ;
y1 = ydebut1 + hauteurLigne*[1:nbligne] ;

entetetableau1 = []
for i = 1:nbcol
    entetetableau1(i) =  "<text x="""+string(x11(i))+""" y="""+...
        string(marge1 + espace + corps)+""" font-weight=""bold"" > "+...
        "N </text>"+...
        "<text x="""+string(x11(i)+2.5*corps + espace)+""" y="""+...
        string(marge1 + espace + corps)+""" font-weight=""bold"" > "+...
        "ln(N) </text>"
end

tableau11 = []; // initialisation

indice = 1;
for i = 1:nbcol
    for j = 1:nbligne
        saut=floor(0.1*(j-1));
        if 10*round(indice/10) == indice then
            tableau11(indice) = "<text x="""+string(x11(i))+""" y="""+...
            string(y1(j) + saut*corps)+""" font-weight=""bold"" > "
        else
            tableau11(indice) = "<text x="""+string(x11(i))+""" y="""+...
            string(y1(j) + saut*corps)+""" > "
        end
        tableau11(indice) = tableau11(indice)+...
           string(Npetits(indice)) + " </text>";
        indice = indice + 1
    end
end

x12 = x11 + 2.5*corps + espace;

tableau12=[];
indice = 1;
for i = 1:nbcol
    for j = 1:nbligne
        saut=floor(0.1*(j-1));
        foo = logNpetits(indice)
        if length(foo) > 6 then
            foo = strsplit(foo, 6);
            chaine = foo(1)+" "+foo(2);
        else
            chaine=foo;
        end
        tableau12(indice) = "<text x="""+string(x12(i))+""" y="""+...
        string(y1(j) + saut*corps)+""" > "+...
        chaine + " </text>";
        indice = indice + 1
    end
end

cadreTableau1 = "<rect fill=""none"" stroke=""black"" stroke-width=""0.4"" "+...
   "x="""+string(marge)+""" y="""+string(marge1)+...
   """ width="""+string(largeurCol*(nbcol))+...
   """ height="""+string(hauteurLigne*(nbligne+1) + 2*espace + 2*corps)+""" />";

y11 = marge1;
y12 = marge1 + 2*espace + 2*corps + hauteurLigne*(nbligne+1);
filetsTableau1 = [];
for i = 1:nbcol
    filetsTableau1(i)="<line stroke=""black"" stroke-width=""0.2"" "+...
    "x1="""+string(marge - 4.5*espace + (i - 0.5)*largeurCol)+...
    """ y1="""+string(y11)+...
    """ x2="""+string(marge - 4.5*espace + (i - 0.5)*largeurCol)+...
    """ y2="""+string(y12)+""" />"
end

for i = 1:(nbcol-1)
    filetsTableau1(i+nbcol)="<line stroke=""black"" stroke-width=""0.2"" "+...
    "x1="""+string(marge + i*largeurCol - 1.25*espace)+...
    """ y1="""+string(y11)+...
    """ x2="""+string(marge + i*largeurCol - 1.25*espace)+...
    """ y2="""+string(y12)+""" /> "+...
    "<line stroke=""black"" stroke-width=""0.2"" "+...
    "x1="""+string(marge + i*largeurCol - 0.75*espace)+...
    """ y1="""+string(y11)+...
    """ x2="""+string(marge + i*largeurCol - 0.75*espace)+...
    """ y2="""+string(y12)+""" />";
end
filetsTableau1($+1)="<line stroke=""black"" stroke-width=""0.4"" "+...
    "x1="""+string(marge)+...
    """ y1="""+string(marge1 + 2*espace + corps)+...
    """ x2="""+string(marge + largeurCol*(nbcol))+...
    """ y2="""+string(marge1 + 2*espace + corps)+""" /> "

// *******************************
// * Contruire le second tableau *
// *******************************

marge2 = y12 + 3*corps + espace;
ydebut2 = marge2 + 3*espace + corps;
y2 = ydebut2 + hauteurLigne*[1:nbligne] ;

entetetableau2 = []
for i = 1:nbcol
    entetetableau2(i) =  "<text x="""+string(x11(i))+""" y="""+...
        string(marge2 + espace + corps)+""" font-weight=""bold"" > "+...
        "N </text> "+...
        "<text x="""+string(x11(i)+2.5*corps + espace)+""" y="""+...
        string(marge2 + espace + corps)+""" font-weight=""bold"" > "+...
        "ln(N) </text>"
end

tableau21 = []; // initialisation

indice = 1;
for i = 1:nbcol
    for j = 1:nbligne
        saut=floor(0.1*(j-1));
        if 10*round(indice/10) == indice then
            tableau21(indice) = "<text x="""+string(x11(i))+""" y="""+...
            string(y2(j) + saut*corps)+""" font-weight=""bold"" > "
        else
            tableau21(indice) = "<text x="""+string(x11(i))+""" y="""+...
            string(y2(j) + saut*corps)+""" > "
        end
        tableau21(indice) = tableau21(indice)+...
           string(Ngrands(indice)) + " </text>";
        indice = indice + 1
    end
end

tableau22=[];
indice = 1;
for i = 1:nbcol
    for j = 1:nbligne
        foo = logNgrands(indice)
        if length(foo) > 5 then
            foo = strsplit(foo, 5);
            chaine = foo(1)+" "+foo(2);
        else
            chaine=foo;
        end
        saut=floor(0.1*(j-1));
        tableau22(indice) = "<text x="""+string(x12(i))+""" y="""+...
        string(y2(j) + saut*corps)+""" > "+...
        chaine + " </text>";
        indice = indice + 1
    end
end

cadreTableau2 = "<rect fill=""none"" stroke=""black"" stroke-width=""0.4"" "+...
   "x="""+string(marge)+""" y="""+string(marge2)+...
   """ width="""+string(largeurCol*(nbcol))+...
   """ height="""+string(hauteurLigne*(nbligne+1) + 2*espace + 2*corps)+""" />";

y21 = marge2;
y22 = marge2 + 2*espace + 2*corps + hauteurLigne*(nbligne+1);
filetsTableau2 = [];
for i = 1:nbcol
    filetsTableau2(i)="<line stroke=""black"" stroke-width=""0.2"" "+...
    "x1="""+string(marge - 4.5*espace + (i - 0.5)*largeurCol)+...
    """ y1="""+string(y21)+...
    """ x2="""+string(marge - 4.5*espace + (i - 0.5)*largeurCol)+...
    """ y2="""+string(y22)+""" />"
end

for i = 1:(nbcol-1)
    filetsTableau2(i+nbcol)="<line stroke=""black"" stroke-width=""0.2"" "+...
    "x1="""+string(marge + i*largeurCol - 1.25*espace)+...
    """ y1="""+string(y21)+...
    """ x2="""+string(marge + i*largeurCol - 1.25*espace)+...
    """ y2="""+string(y22)+""" /> "+...
    "<line stroke=""black"" stroke-width=""0.2"" "+...
    "x1="""+string(marge + i*largeurCol - 0.75*espace)+...
    """ y1="""+string(y21)+...
    """ x2="""+string(marge + i*largeurCol - 0.75*espace)+...
    """ y2="""+string(y22)+""" />";
end
filetsTableau2($+1)="<line stroke=""black"" stroke-width=""0.4"" "+...
    "x1="""+string(marge)+...
    """ y1="""+string(marge2 + 2*espace + corps)+...
    """ x2="""+string(marge + largeurCol*(nbcol))+...
    """ y2="""+string(marge2 + 2*espace + corps)+""" /> "

// fichier SVG

matriceFichier = [entete
" "
"<text x="""+string(marge)+""" y="""+string(marge+corps)+...
  """ font-weight=""bold"">Table des logarithmes népériens entre 0,01 et 1</text>"
" "
"<!-- *******************"
"     * Premier tableau *"
"     ******************* -->"
" "
entetetableau1
" "
"<!-- N -->"
tableau11
" "
"<!-- ln(N) -->"
tableau12
" "
"<!-- cadre -->"
cadreTableau1
filetsTableau1
"<text x="""+string(marge)+""" y="""+string(marge2-espace)+...
  """ font-weight=""bold"">Table des logarithmes népériens entre 1 et 100</text>"
" "
" "
"<!-- ********************"
"     * Deuxieme tableau *"
"     ******************** -->"
" "
entetetableau2
" "
"<!-- N -->"
tableau21
" "
"<!-- ln(N) -->"
tableau22
" "
"<!-- cadre -->"
cadreTableau2
filetsTableau2
" "
finDeFichier];

chdir(chemin);
write(nomDeFichier, matriceFichier);

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:47, 7 November 2017Thumbnail for version as of 10:47, 7 November 2017526 × 744 (26 KB)Cdang (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata