####################################################################################################################################### # # # V I S U A L I S A T I O N D E S P R E M I E R E S D E C I M A L E S D E P I ( E N B A S E 2 ) # # C O M M E U N E I M A G E B I N A I R E : # # # # # # Author of '$xiirv/.PIPO.G1.2.$U' : # # # # Jean-Francois Colonna (LACTAMME, 20140204142010). # # # ####################################################################################################################################### $Z SETParam _____Spirale $NEXIST $Z # Parametre introduit le 20140204150713... # $Z SETParam _____Triangle $NEXIST $Z # Parametre introduit le 20140204181639... # $Z FilSTmpB FiLePoInTs $Z FilSTmpB FiLeDeCiMaLeS $Z echo "ibase = 10;" \ $Z >> $FiLeDeCiMaLeS $Z echo "obase = 2;" \ $Z >> $FiLeDeCiMaLeS $Z echo "pi=\\" \ $Z >> $FiLeDeCiMaLeS #20140206122559____:$Z $CA $_____FDecimales | \ # #20140206122559____:$Z $SE -e "s/^ *//" \ # #20140206122559____:$Z -e "s/3,/0./" | \ # #20140206122559____:$Z $GRE -v '^ *$' | \ # #20140206122559____:$Z $GRE -v 'alcul ' | \ # #20140206122559____:$Z $SE -e "s/ //g" \ # #20140206122559____:$Z -e 's/$/\\/' \ # #20140206122559____:$Z >> $FiLeDeCiMaLeS # $Z $CA $_____FDecimales | \ $Z $SE -e "s/^ *//" \ $Z -e "s/^[$Alphabet_0_9]*[.,]/0./" | \ $Z $GRE -v '^ *$' | \ $Z $GRE -v 'alcul ' | \ $Z $SE -e "s/ //g" \ $Z -e 's/$/\\/' \ $Z >> $FiLeDeCiMaLeS $Z echo ";" \ $Z >> $FiLeDeCiMaLeS $Z echo "pi;" \ $Z >> $FiLeDeCiMaLeS $Z echo "quit;" \ $Z >> $FiLeDeCiMaLeS $Z set NPoInTs=$tailleI $Z FilSTmpB FiLeBaSe2 $Z $BC $FiLeDeCiMaLeS | \ $Z $SE -e "s/^0*\.//" \ $Z -e 's/\\$//' \ $Z -e "s/\(.\)/\1@/g" | \ $Z $R "@" "$K_NL" | \ $Z $GRE -v '^ *$' \ $Z >> $FiLeBaSe2 $Z set NChiFfReS2 = `$CA $FiLeBaSe2 | $WCl` $Z @ NChiFfReS2 = $NChiFfReS2 - 20 $Z if ($NChiFfReS2 < $NPoInTs) then $Z echo "Il n'y a pas assez de chiffres binaires ($NChiFfReS2 < $NPoInTs)." $Z # On notera les experiences faites aux environs du 20140301085002 : # $Z # # $Z # 3.14 11.0010001 $Z # || $Z # 3.1415 11.00100100001110 $Z # | $Z # 3.141592 11.00100100001111110101 $Z # || $Z # 3.14159265 11.001001000011111101101010011 $Z # # $Z # qui montrent que les dernieres decimales (en base 2) ne sont pas fiables, d'ou la marge # $Z # de securite (-20) dans l'evaluation de '$NChiFfReS2'... # $Z else $Z endif $Z $CA $FiLeBaSe2 | \ $Z $HEA -$NPoInTs | \ $Z $SE -e 's/^1$'"/$BLANC/" \ $Z > $FiLePoInTs$NIVEAU $Z FilSTmpE FiLeBaSe2 $Z FilSTmpE FiLeDeCiMaLeS $Z if ($_____Spirale == $EXIST) then $Z set VaLeUrS="$xci/valeurs_spir$X" $Z else $Z if ($_____Triangle == $EXIST) then $Z set VaLeUrS="$xci/valeurs_triangle$X" $Z else $Z set VaLeUrS="$xci/valeurs_imag$X normalisees=VRAI" $Z endif $Z endif $Z set VaLeUrS="$VaLeUrS"" premiere=1 derniere=$NPoInTs" $Z $VaLeUrS \ $Z Px=1 Py=0 \ $Z > $FiLePoInTs$COORD_X $Z $VaLeUrS \ $Z Px=0 Py=1 \ $Z > $FiLePoInTs$COORD_Y $Z $xrv/store_image$X ne=$NPoInTs \ $Z LISTE_X=$FiLePoInTs$COORD_X \ $Z LISTE_Y=$FiLePoInTs$COORD_Y \ $Z LISTE_NIVEAU=$FiLePoInTs$NIVEAU \ $Z R=$_____ImageR \ $Z $formatI $Z FilSTmpE FiLePoInTs