Search found 763 matches

by einstein1969
01 Nov 2018 10:24
Forum: DOS Batch Forum
Topic: Seven segment display
Replies: 2
Views: 557

Re: Seven segment display

Hi Icarus, very nice work!
This is very fast color graphics
by einstein1969
05 Jun 2018 08:44
Forum: DOS Batch Forum
Topic: Dos Batch Math Library
Replies: 59
Views: 18176

Re: Dos Batch Math Library

Hey, I wanted to share something I made last night. I thought maybe this would be useful FIXED! Accuracy is 100% https://gyazo.com/1765c4579c80f2688789b12901d762ad.png @echo off & setlocal enableDelayedExpansion for /l %%a in (1,1,20) do ( set /a "rnd1=!random! %% 49 + 1", "rnd2=!random! %% 49 + 1"...
by einstein1969
04 Jun 2018 08:21
Forum: DOS Batch Forum
Topic: Dos Batch Math Library
Replies: 59
Views: 18176

Re: Dos Batch Math Library

Sorry to dig this up, but I've found use out of this. I was also wondering if it were possible to create a POW macro such as this? Thanks in advanced!! the pow function is reconducible to log function and exp function. pow( x, y ) => exp( y * log( x ) ) I will try to attemp using this article https...
by einstein1969
27 May 2018 16:33
Forum: DOS Batch Forum
Topic: How does this colour Batch script work?
Replies: 4
Views: 818

Re: How does this colour Batch script work?

The new windows version 10 include more color using VT100 escape sequences The code iterate in HSL colors and convert to RGB and put a color char using escape sequence this code show more colors, use raster fonts 4x6 to get in full screen @echo off & setlocal enabledelayedexpansion mode 260,92 for /...
by einstein1969
03 May 2018 10:08
Forum: DOS Batch Forum
Topic: And now dos batch color secrets?
Replies: 19
Views: 6445

Re: And now dos batch color secrets?

Hi Icarus,

This is great result!!!

Einstein1969
by einstein1969
09 Dec 2017 18:00
Forum: DOS Batch Forum
Topic: timed batch file execution
Replies: 11
Views: 2838

Re: timed batch file execution

You could do something like this: :start if current_time more than 09:00 then notepad.exe wait 1 minute (or wait 24 hours) goto start Saso this? @echo off :label ping 127.0.0.1 -n 2 >nul if %time:~0,2% equ 9 if %time:~3,2% equ 0 ( start notepad.exe ping 127.0.0.1 -n 86398 >nul ) goto label einstein...
by einstein1969
21 Oct 2017 04:21
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

I have done the above optimizzation The new gain is about 15% or more for big NumQuads. time is in seconds http://i66.tinypic.com/2czcx14.png the new version include, if defined pidebug variable, print on title with current time and percent achieved. It sync the timer at 00 second before start for e...
by einstein1969
21 Oct 2017 01:35
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

I thinks that next step is using multi-thread creating a pipeline... But in the middle there is an optimization in the block of division: AR_Recip/N AR_Recip/N => AR_Recip/(N*N) But this can have an overflow if N*N > 214747 For formulas : Pi = 48*arctan(1/18) + 32*arctan(1/57) - 20*arctan(1/239) and...
by einstein1969
19 Oct 2017 09:27
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

I have probed to tuning for best performance the version 4. There are few things to do but I have tried and I have done the follow: - The SET/A is faster if use costant then I have removed the variable @ - Remove unused variables, move at bottom of environment less used variables. N_FORMULA->_FORMUL...
by einstein1969
18 Oct 2017 11:57
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

I have compared the last version of mine and your and the original :shock: :shock: :shock: :lol:

time in seconds.
Image

Francesco
by einstein1969
18 Oct 2017 09:44
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

Hi Antonio, this version is very efficiency. There is a problem when I press CONTROL-C, the batch don't stop. It's possible break ? Francesco EDIT set /A A_NumGroups = 3 set /A A_NumQuads = NumGroups*25, A_MaxQuadIndex = A_NumQuads-1, @ = 10000 There is an error on A_NumQuads. It uses NumGroup inst...
by einstein1969
15 Oct 2017 07:52
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

I have just realized that SET/P is slower than FOR/F this version substitute the precedent. The break even point (BEP) is passed from about 500 NumQuads to about 400 NumQuads. http://i63.tinypic.com/qswo6a.png the new code: @if defined talk (echo on) else (echo off) setlocal EnableDelayedExpansion e...
by einstein1969
11 Oct 2017 08:28
Forum: DOS Batch Forum
Topic: How to move cursor upwards without cls?
Replies: 21
Views: 4061

Re: How to move cursor upwards without cls?

The timeout command go at 0,1 (x,y) and not 0,0 and delete the INITIAL next line partially(Line 4). IT leave a message that I delete with the CMD part with set /P. example: @echo off echo. Line 0 Echo. Line 1 echo. Line 2 Echo. Line 3 call :goto_home echo.Home pause>nul exit /B :goto_home timeout /t...
by einstein1969
11 Oct 2017 06:38
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

I have made some tests. The original pi are better for low NUMQUAD, but the pi on file is faster on big NUMQUAD. These are results. (Time in seconds) QUADS http://i63.tinypic.com/28mjnsm.png The pi on file include major change token from AAcini version This is the version on file. EDIT: I have resol...
by einstein1969
10 Oct 2017 09:02
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 5508

Re: Batch macro vs function call test

very clever solution for minimize number of SET istruction. The limit on 8192 is in also the variable PRINTBUFFER. It is possible eliminate this problem on variable PRINTBUFFER? I'm working on a version that eliminate the use of variable. It use some files but is very slow at moment but the time is...