<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>code &#8211; Aptech</title>
	<atom:link href="https://www.aptech.com/blog/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aptech.com</link>
	<description>GAUSS Software - Fastest Platform for Data Analytics</description>
	<lastBuildDate>Tue, 14 Jan 2025 16:59:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>What you need to know about #include</title>
		<link>https://www.aptech.com/blog/what-you-need-to-know-about-include/</link>
					<comments>https://www.aptech.com/blog/what-you-need-to-know-about-include/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Fri, 02 Nov 2018 19:22:29 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[errors]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=17829</guid>

					<description><![CDATA[If you have run much publicly available GAUSS code, you have probably come across the `#include` command. In this blog, we answer some important questions about #include:
<ol>
<li> What does `#include` do?</li>
<li> What is the most common error when using `#include`?</li>
<li>How can I resolve the most common error?</li>
</ol>]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>If you have run much publicly available GAUSS code, you have probably come across the <code>#include</code> command. Since it is used so much, it will be helpful to answer these questions:</p>
<ol>
<li>What does <code>#include</code> do?</li>
<li>What is the most common error when using <code>#include</code>?</li>
<li>How can I resolve the most common error?</li>
</ol>
<h2 id="what-does-include-do">What does #include do?</h2>
<p>The <code>#include</code> command is almost exactly like an instruction telling GAUSS to copy-and-paste the contents of one file into another. It is often used so that a file containing procedures and/or control variables can be kept separate from the main code file.</p>
<h3 id="example-without-include">Example without #include</h3>
<p>For example, let's imagine we have a file named <code>hypotenuse.gss</code> with the following contents:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">a = 3;
b = 4;

c = hypotenuse(a, b);

proc (1) = hypotenuse(a,b);
    retp(sqrt(a.^2 + b.^2));
endp;</code></pre>
<p>We can run this file and it will assign <code>c</code> to be equal to 5 as we expect.</p>
<h3 id="example-with-include">Example with #include</h3>
<p>If we will only ever want to use the <code>hypotenuse</code> procedure in this one file, then it is probably fine to leave it as it is. However, if this procedure will be reused a lot, it might be better to just have one copy of the procedure, instead of copy-and-pasting the procedure every time we need to use it.</p>
<p>To do this, we would break our <code>hypotenuse.gss</code> file up into two files, <code>main.gss</code> and <code>hypotenuse.src</code>. The contents of <code>main.gss</code> will be:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">a = 3;
b = 4;

c = hypotenuse(a,b);

// Make hypotenuse procedure available
#include hypotenuse.src</code></pre>
<p>and the contents of <code>hypotenuse.src</code> will be:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">proc (1) = hypotenuse(a,b);
    retp(sqrt(a.^2 + b.^2));
endp;</code></pre>
<p>As long as GAUSS can find the <code>hypotenuse.src</code> file, these versions will behave identically.</p>
<h2 id="the-most-common-include-error">The most common #include error</h2>
<p>By far the most common error occurs when GAUSS cannot find the <code>#include'd</code> file. If GAUSS could not find our <code>hypotenuse.src</code> file, we would get an error like this:</p>
<pre>G0014 : File not found 'C:\gauss\examples\hypotenuse.src'</pre>
<h3 id="where-does-gauss-look-for-the-include-file">Where does GAUSS look for the #include file?</h3>
<p>When shown an error message stating that the file cannot be found in a directory such as <code>C:\gauss\examples\</code>, people often wonder why GAUSS looked for the file in their GAUSS examples directory. GAUSS did search in the directory found in the error message. However, that is the last place that GAUSS looked. </p>
<p>The GAUSS <code>#include</code> command will search the following locations, in this order:</p>
<ol>
<li>Your current working directory.</li>
<li>The files in your <a href="https://www.aptech.com/resources/tutorials/src_path/">SRC_PATH</a>.</li>
</ol>
<h3 id="how-can-i-resolve-the-problem">How can I resolve the problem?</h3>
<p>If GAUSS cannot find a <code>#include'd</code> file you can fix the problem by either:</p>
<ol>
<li>Changing your GAUSS working directory to the folder in which the file is located.</li>
<li>Moving the file to one of the GAUSS <a href="https://www.aptech.com/resources/tutorials/src_path/">SRC_PATH</a> locations.</li>
<li>Adding a full path to the <code>#include</code> statement.</li>
</ol>
<h2 id="the-second-most-common-include-error">The second most common #include error</h2>
<div class="alert alert-info" role="alert"><strong>Update</strong>: This issue has been resolved in GAUSS version 22 and newer.</div>
<p><a href="https://www.aptech.com/wp-content/uploads/2018/11/gblog-include-pgm.png"><img src="https://www.aptech.com/wp-content/uploads/2018/11/gblog-include-pgm.png" alt="#include from the GAUSS command line." width="684" height="268" class="aligncenter size-full wp-image-18545" /></a>
The second most common error with <code>#include</code> occurs when either:</p>
<ol>
<li>Entering the <code>#include</code> command in the <strong>Program Input/Output</strong> window.</li>
<li>Running a <code>#include</code> statement by right-clicking and selecting <strong>Run Selected Text</strong>, or <strong>Run Current Line</strong>.</li>
</ol>
<p>Either of these will return an error like this:</p>
<pre>G0008: Syntax error '#include hypotenuse.src'</pre>
<p>This is because <code>#include</code> statements must be run as part of a program file.</p>
<h3 id="how-can-i-resolve-the-problem-1">How can I resolve the problem?</h3>
<p>If you would like to execute the command <code>#include &lt;filename&gt;</code> in the GAUSS <strong>Program Input/Output</strong> window, simply replace <code>#include</code> with <code>run</code>. </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Use the 'run' statement at the GAUSS command line
run hypotenuse.src</code></pre>
<p>The <code>run</code> command will execute the code in the file exactly as if the <code>#include</code> statement was run as part of a program file.</p>
<h3 id="conclusions">Conclusions</h3>
<p>Today we have learned:</p>
<ol>
<li>What the <code>#include</code> command does in GAUSS.</li>
<li>Why it is used.</li>
<li>The two most common errors associated with its usage.</li>
<li>Methods to resolve common errors.</li>
</ol>
<p>Code and data from this blog can be found <a href="https://github.com/aptech/gauss_blog/tree/master/programming/include-statements-11.02.18">here</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/what-you-need-to-know-about-include/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Make your code portable: Data paths</title>
		<link>https://www.aptech.com/blog/make-your-code-portable-data-paths/</link>
					<comments>https://www.aptech.com/blog/make-your-code-portable-data-paths/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Fri, 26 Oct 2018 17:35:07 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[paths]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=17755</guid>

					<description><![CDATA[In this blog, we explore data path best practices for making GAUSS code more portable and replicable. Using variables and predefined GAUSS path definitions, we show how to simplify code and easily customize data loading. ]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>Most GAUSS users keep their code and data from different projects in separate directories. This is a good practice since it helps keep your work organized. </p>
<p>However, since it is your code and your computer, it can seem like the path of least resistance is to add full path references to any data that you read or write. Below is a toy example that illustrates the issue.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load data
y = loadd("C:\\Users\\YourUserName\\Projects\\GAUSS\\data\\mydata.csv");
oil_vars = xlsReadM("C:\\Users\\YourUserName\\Projects\\GAUSS\\data\\oil.xlsx", "A2:A220");

// Estimate least squares parameters
parameters = invpd(oil_vars'oil_vars)*(oil_vars'y);

// Write estimated parameters to output file
call xlsWriteM(parameters, "C:\\Users\\YourUserName\\Projects\\GAUSS\\data\\oil_parms.xlsx", "A2");</code></pre>
<p>Assuming the paths are correct, this will work fine for you–at least when you first write it. However, if you want to share the code with others, run it on multiple computers or upgrade your computer, the paths will have to be changed. </p>
<p>For a simple program like the one above, you can probably get the change made in under a minute. But most programs are longer and more complicated than this and it is common to have path references throughout the code.</p>
<h2 id="step-1-make-variables-to-hold-your-paths">Step 1: Make variables to hold your paths</h2>
<p>The first thing we can do to simplify this code is to make one variable at the top of the program which contains the path.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create variable to hold the path
path = "C:\\Users\\YourUserName\\Projects\\GAUSS\\data\\";

// Load data
y = loadd(path $+ "mydata.csv");
oil_vars = xlsReadM(path $+ "oil.xlsx", "A2:A220");

// Estimate least squares parameters
parameters = invpd(oil_vars'oil_vars)*(oil_vars'y);

// Write estimated parameters to output file
call xlsWriteM(parameters, path $+ "oil_parms.xlsx", "A2");</code></pre>
<p>This is a great step because we now only have to change the path in one place. No more digging through hundreds or thousands of lines of code!</p>
<h2 id="step-2-use-__file_dir-to-find-the-path-for-you">Step 2: Use __FILE_DIR to find the path for you</h2>
<p>While only having to modify your paths in one location does not sound too bad, do you really want to have to make that change, or would you rather have it just work? </p>
<p>Furthermore, it can be a significant problem if multiple people are working with the code, or if you are using version control. Wouldn't it be nice if we could just ask GAUSS to figure out the path for us? Fortunately, <code>__FILE_DIR</code> (first available in version 18) does exactly this.</p>
<h3 id="what-does-__file_dir-tell-gauss-to-do">What does __FILE_DIR tell GAUSS to do?</h3>
<p>Whenever GAUSS sees <code>__FILE_DIR</code> in a program, it replaces it with the full path to the location of the file which contains the <code>__FILE_DIR</code> statement. So if we add the following command to the top of the file <code>C:\gauss22\examples\ols.e</code>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Print the full path to the location of this file
print __FILE_DIR;</code></pre>
<p>when we run it, in addition to the OLS estimates that the example prints out, we will see:</p>
<pre>C:\gauss22\examples\</pre>
<p>If you placed that same statement in the file <code>/Users/david/programs/myprogram.gss</code>, then it would print out:</p>
<pre>/Users/david/programs/</pre>
<h3 id="replace-the-first-path-with-__file_dir">Replace the first path with __FILE_DIR</h3>
<p>Now that we have a tool to return the path of our program file, we need to decide how we want the project set up. If we just want to keep everything for the project in one folder, we can do this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create variable to hold the path
path = __FILE_DIR;

// Load data
y = loadd(path $+ "mydata.csv");
oil_vars = xlsReadM(path $+ "oil.xlsx", "A2:A220");

// Estimate least squares parameters
parameters = invpd(oil_vars'oil_vars)*(oil_vars'y);

// Write estimated parameters to output file
call xlsWriteM(parameters, path $+ "oil_parms.xlsx", "A2");</code></pre>
<p>For a very simple project this is probably fine and as long as the code and the data are in the same folder, the code will just run on any computer without modification. But we may wish to separate the code and the data into separate folders. For example, let's say we want our project to be laid out like this:</p>
<ul>
<li><code>ols_oil</code> - base path for project.</li>
<li><code>ols_oil/data</code> - folder to hold input data files.</li>
<li><code>ols_oil/main</code> - folder to hold our main program.</li>
<li><code>ols_oil/results</code> - folder to hold the output written by the main program.</li>
</ul>
<p>Since  the <code>data</code> folder and the <code>results</code> folder are at the same level (or depth) as the 'main' folder which contains our main program, we will have to use <code>..</code> to go back to <code>ols_oil</code> from <code>ols_oil/main</code>.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Get full path to ols_oil/main
main_path = __FILE_DIR;

// Get full path to ols_oil/data
data_path = main_path $+ "..\\data\\";

// Get full path to ols_oil/results
rslt_path = main_path $+ "..\\results\\";

// Load data
y = loadd(data_path $+ "mydata.csv");
oil_vars = xlsReadM(data_path $+ "oil.xlsx", "A2:A220");

// Estimate least squares parameters
parameters = invpd(oil_vars'oil_vars)*(oil_vars'y);

// Write estimated parameters to output file
call xlsWriteM(parameters, rslt_path $+ "oil_parms.xlsx", "A2");</code></pre>
<p>Now as long as the <code>data</code>, <code>results</code> and <code>main</code> sub-folders are all in the same location, this code will run on any computer, regardless of where they place the <code>ols_oil</code> folder or what their GAUSS working directory is set to.</p>
<h3 id="conclusion">Conclusion</h3>
<p>You have just learned how to:</p>
<ul>
<li>Create variables to hold paths.</li>
<li>Use <code>__FILE_DIR</code> for the base path.</li>
</ul>
<p>can make your code more portable and easier to share with others.  </p>
<h3 id="further-reading">Further Reading</h3>
<ol>
<li><a href="https://www.aptech.com/blog/the-current-working-directory-what-you-need-to-know/" target="_blank" rel="noopener">The Current Working Directory: What you need to know</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0025-undefined-symbol/" target="_blank" rel="noopener">Understanding Errors | G0025 : Undefined symbol</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0064-operand-missing/" target="_blank" rel="noopener">Understanding Errors: G0064 Operand Missing</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0058-index-out-of-range/" target="_blank" rel="noopener">Understanding Errors: G0058 Index out-of-Range</a></li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/make-your-code-portable-data-paths/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Make your time series computations up to 20 times faster</title>
		<link>https://www.aptech.com/blog/make-your-time-series-computations-up-to-20-times-faster/</link>
					<comments>https://www.aptech.com/blog/make-your-time-series-computations-up-to-20-times-faster/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Thu, 11 Oct 2018 19:37:54 +0000</pubDate>
				<category><![CDATA[Time Series]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[vectorization]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=17487</guid>

					<description><![CDATA[The key to getting the most performance from a matrix language is to vectorize your code as much as possible. Vectorized code performs operations on large sections of matrices and vectors in a single operation, rather than looping over the elements one-by-one. In this blog, we learn how to use the GAUSS recserar function to vectorize code and simulate a time series AR(1) model.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>The key to getting the most performance from a <a href="https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/" target="_blank" rel="noopener">matrix</a> language is to vectorize your code as much as possible. Vectorized code performs operations on large sections of matrices and vectors in a single operation, rather than looping over the elements one-by-one.</p>
<p>For example, we could scale a vector by looping over each element:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create a random normal vector
// with 10 elements
x = rndn(10,1);

// NOT Vectorized
// Loop through each element
// in 'x' and multiply by 3
for i(1, rows(x), 1);
    x[i] = x[i] * 3;
endfor;</code></pre>
<p>or we could perform all of the multiplications in a single call:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Vectorized
// Scale each element of 'x'
// with a single operation
x = x * 3;</code></pre>
<p>Not only is the second version much shorter, but it is also approximately 10 times faster.</p>
<h2 id="challenges-to-vectorizing-time-series-code">Challenges to vectorizing time series code</h2>
<p>Our initial example cut the lines of code by one third and ran 10 times more quickly. Clearly, this technique is valuable, but not all cases are as simple. Let's start by looking at the standard AR(1) model for <a href="https://www.aptech.com/blog/introduction-to-the-fundamentals-of-time-series-data-and-analysis/" target="_blank" rel="noopener">time series data</a>:</p>
<p>$$y_t = C + \rho y_{t-1} + \epsilon_t$$</p>
<p>Let's start by writing a non-vectorized version of this equation:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Number of observations to simulate
nobs = 5;

// Constant initial value
C = 1;

// AR parameter
rho = 0.3;

// Set random seed for repeatable random numbers
rndseed 5423;

// Pre-allocate vector for the output 'y'
y = C | zeros(nobs, 1);

// Create error term
epsilon = rndn(rows(y), 1);

// Simulate the AR(1) process
for t(2, nobs + 1, 1);
    y[t] = y[t-1] * rho + epsilon[t];
endfor;</code></pre>
<h2 id="loop-carried-dependencies">Loop-carried dependencies</h2>
<p>The problem which prevents us from vectorizing the AR(1) simulation (or parallelizing it) is that each iteration of the loop depends upon the result from the previous iteration. This is the definition of a loop-carried dependence.</p>
<h2 id="vectorizing-an-ar-process-with-recserar">Vectorizing an AR process with recserar</h2>
<p>Fortunately, <a href="https://www.aptech.com/blog/introducing-gauss-24/" target="_blank" rel="noopener">GAUSS</a> has a built-in function for exactly this type of problem, <a href="https://docs.aptech.com/gauss/recserar.html" target="_blank" rel="noopener"><code>recserar</code></a>. In terms of an AR(1) model, <code>recserar</code> has the following inputs:</p>
<hr>
<dl>
<dt>epsilon</dt>
<dd>A Tx1 matrix, the error term.</dd>
<dt>C</dt>
<dd>A scalar, the initial value of the time series.</dd>
<dt>rho</dt>
<dd>A scalar, the AR parameter.</dd>
</dl>
<hr>
<p>Using <code>recserar</code> the code would look like this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">
// Number of observations to simulate
nobs = 5;

// Constant initial value
C = 1;

// AR parameter
rho = 0.3;

// Set random seed for repeatable random numbers
rndseed 5423;

// Create error term
epsilon = rndn(nobs+1, 1);

// Simulate the AR(1) process
y_vec = recserar(epsilon, C, rho);</code></pre>
<div style="text-align:center;background-color:#f0f2f4"><hr>Ready to speed up your time series analysis? <a href="https://www.aptech.com/request-demo/">Start your GAUSS demo today!<hr></a></div>
<h2 id="results">Results</h2>
<p><a href="https://www.aptech.com/wp-content/uploads/2018/10/recserar_speedup_07_2018.png"><img src="https://www.aptech.com/wp-content/uploads/2018/10/recserar_speedup_07_2018.png" alt="Speed increases from simulating AR process with recserar in GAUSS." width="400" height="300" class="aligncenter size-full wp-image-17494" /></a></p>
<p>The speed-up that you see from this change is mainly a function of the length of the number of elements in the vector. In the testing for this post, the <code>recserar</code> version ran up to around 20 times faster as shown in the graph above.</p>
<h3 id="conclusion">Conclusion</h3>
<p>In this post we saw how the GAUSS <code>recserar</code> function can be used to vectorize code with loop-carried dependencies like the simulation of an AR(1) model, giving speed-ups of up to 20 times. </p>
<p>This pattern comes up often in other time series models such as <a href="https://docs.aptech.com/gauss/tsmt/garchfit.html" target="_blank" rel="noopener">GARCH</a>. However, it is not exclusive to time series, so keep it in mind whenever you find a loop that is difficult to vectorize.</p>
<p>Code and data from this blog can be found <a href="https://github.com/aptech/gauss_blog/tree/master/programming/faster-time-series-10.11.18">here</a>.</p>
    <!-- MathJax configuration -->
    <style>
        .mjx-svg-href {
            fill: "inherit" !important;
            stroke: "inherit" !important;
        }
    </style>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: "AMS"} } });
    </script>
    <script type="text/javascript">
window.MathJax = {
  tex2jax: {
    inlineMath: [ ['$','$'] ],
    displayMath: [ ['$$','$$'] ],
    processEscapes: true,
    processEnvironments: true
  },
  // Center justify equations in code and markdown cells. Elsewhere
  // we use CSS to left justify single line equations in code cells.
  displayAlign: 'center',
  "HTML-CSS": {
    styles: {'.MathJax_Display': {"margin": 0}},
    linebreaks: { automatic: false }
  },
  "SVG": {
    styles: {'.MathJax_SVG_Display': {"margin": 0}},
    linebreaks: { automatic: false }
  },
  showProcessingMessages: false,
  messageStyle: "none",
  menuSettings: { zoom: "Click" },
  AuthorInit: function() {
    MathJax.Hub.Register.StartupHook("End", function() {
            var timeout = false, // holder for timeout id
            delay = 250; // delay after event is "complete" to run callback
            var shrinkMath = function() {
              //var dispFormulas = document.getElementsByClassName("formula");
              var dispFormulas = document.getElementsByClassName("MathJax_SVG_Display");
              if (dispFormulas){
                // caculate relative size of indentation
                var contentTest = document.getElementsByTagName("body")[0];
                var nodesWidth = contentTest.offsetWidth;
                // if you have indentation
                var mathIndent = MathJax.Hub.config.displayIndent; //assuming px's
                var mathIndentValue = mathIndent.substring(0,mathIndent.length - 2);
                for (var i=0; i<dispFormulas.length; i++){
                  var dispFormula = dispFormulas[i];
                  var wrapper = dispFormula;
                  //var wrapper = dispFormula.getElementsByClassName("MathJax_Preview")[0].nextSibling;
                  var child = wrapper.firstChild;
                  wrapper.style.transformOrigin = "center"; //or top-left if you left-align your equations
                  var oldScale = child.style.transform;
                  //var newValue = Math.min(0.80*dispFormula.offsetWidth / child.offsetWidth,1.0).toFixed(2);
                  var newValue = Math.min(dispFormula.offsetWidth / child.offsetWidth,1.0).toFixed(2);
                  var newScale = "scale(" + newValue + ")";
                  if(newValue != "NaN" && !(newScale === oldScale)){
                    wrapper.style.transform = newScale;
                    wrapper.style["margin-left"]= Math.pow(newValue,4)*mathIndentValue + "px";
                    var wrapperStyle = window.getComputedStyle(wrapper);
                    var wrapperHeight = parseFloat(wrapperStyle.height);
                    wrapper.style.height = "" + (wrapperHeight * newValue) + "px";
                    if(newValue === "1.00"){
                      wrapper.style.cursor = "";
                      wrapper.style.height = "";
                    }
                    else {
                      wrapper.style.cursor = "zoom-in";
                    }
                  }

                }
            }
            };
            shrinkMath();
            window.addEventListener('resize', function() {
              clearTimeout(timeout);
              timeout = setTimeout(shrinkMath, delay);
            });
          });
  }
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_SVG"></script>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/make-your-time-series-computations-up-to-20-times-faster/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
