text:
# Invoking multiple kernel functions from the GPU

#### Content

Multiple kernel function can be invoked subsequently and work with results left in GPU memory by previous invocations. Hence, it is not necessary to copy data from and to the GPU between two calls.

Invocations of kernel functions are serialized within a so-called stream. If a kernel is configured, you are free to specify a stream. If none is given, a default stream is taken which causes all kernel function invocations to be processed sequentially.

Note that the invocation of a kernel function returns immediately long before the kernel finishes. Copying functions like cudaMemcpy are likewise associated with a stream. Hence, it is the invocation of cudaMemcpy that by default blocks until the previous invocation of a kernel function is completed. We will later see how this can be parallelized by working with multiple streams.

## Exercise

• Write a kernel function named asum that aggregates per block the sums of the vector $$\vec{x}$$ and stores the results in sums.

template<typename T>
__global__ void asum(std::size_t n, const T* x, T* sums) {
/* ... */
}

• Adapt the previous solution such that the total sum is no longer computed by the CPU. Instead the kernel function asum is to be invoked repeatedly until we have only one block left that computes the overall sum. Then just one double value has to be returned from the GPU to the CPU.

format: plain


text:
Show Summary Details

# p. 172. Self-similarity

• Kenneth J. Falconer

### Abstract

Fractals demonstrate ‘Self-similarity’ — each set comprises several smaller similar copies of itself. This can be demonstrated using a geometric shape as a template which represents an attractor. Templates describe graphically the functions which govern the movement between points on a plane. Templates can give an approximation of a fractal, but can be drawn on a computer using the Chaos Game. Self-affine fractals allow an increase in the range of fractal possibilities via modifications to template dimensions, whilst statistically self-similar fractals add an element of randomness for a more natural appearance. Fractals can also be used to compress images to more manageable file sizes.

### Self-similar fractals and their templates

The concept of similarity features prominently in classical geometry, notably in the writings of the Greek mathematician Euclid (c.300 bc), the ‘Father of Geometry’, who laid the foundations of rigorous geometrical argument. Two figures in the plane are similar if they have the same shape, but not necessarily the same size, so that one may be obtained from the other first by scaling and then sliding it around and rotating it, perhaps flipping it over. In modern parlance, two objects in the plane are similar if it is possible to make a reduced or enlarged photocopy of one and position it to coincide exactly with the other, perhaps turning it over first. If this can be done without scaling, in other words, with a same size photocopy, the objects are called congruent. Otherwise, the reduction or enlargement factor required to produce the similar copy is called the scale or scaling ratio of the copy, which may be expressed as either a fraction or percentage. Thus if a figure is a ¼ scale (or 25 per cent scale) copy of another then all the lines in the copy are ¼ of the length of the corresponding lines in the original.

All circles are similar to each other, as are all squares. However, two triangles are similar precisely when the three angles of one triangle are the same as the three angles of the other. Two p. 18rectangles are similar just when the length of the longer side divided by that of the shorter side is the same for both rectangles. Figure 8 shows several figures that are all similar to each other.

A self-similar set is one that is made up of several smaller similar copies of itself. We’ve seen that the von Koch curve is self-similar since it comprises 4 suitably placed scale ⅓ copies of itself. This may be represented diagrammatically by a template consisting of one large rectangle and 4 smaller ones, each a ⅓ scale copy of the large one, see Figure 9. The part of the von Koch curve framed by each of the smaller rectangles is a ⅓ scale copy of the whole curve framed by the large rectangle. The size and position of the p. 19rectangles specify the scaling and positioning needed to fit together the four smaller copies to make up the whole von Koch curve.

But much more than this is true. The template is a simple diagram made up of classical geometrical shapes, namely five rectangles—there is nothing fractal about it. Nevertheless, the template completely defines the fractal: the von Koch curve is (essentially) the only object that is made up of smaller scaled copies of itself positioned as indicated by the template. It is easy to reconstruct the von Koch curve from the template by repeated substitution of a scaled template into the smaller rectangles. The first couple of stages are indicated in Figure 10 from which it p. 20should be clear that the small rectangles form patterns that get progressively closer to the von Koch curve itself.

This is a particular case of a very general and powerful method of describing and constructing fractals. A template consists of some simple shape (square, rectangle, triangle, etc.) and a number of smaller similar copies of the shape positioned somehow in the plane. Each of the smaller shapes represents a similarity transformation or scaling transformation that takes the larger shape and scales and repositions it to coincide with the smaller copy, scaling and positioning any figure drawn inside correspondingly. A fundamental property is that templates define fractals. That is, given a template, there is essentially just one figure, usually a fractal, made up of smaller copies of itself scaled and positioned according to the shapes in the template. (This statement is not quite accurate, but we will be more precise soon.) This figure is sometimes called the attractor of the template.

For a template made up of similar shapes, the attractor will be self-similar. Figures 11 and 12 show several self-similar fractals with their templates. In each case note that what is seen in each of the smaller regions of the template is a scaled copy of the whole. Figure 11 is known as the (right-angled) Sierpiński triangle made up of 3 copies of itself at scale ½. The snowflake of Figure 12(a) is made up of 4 smaller copies of itself; 3 are at scale ¼ whilst the larger central copy is at scale ¾ and has been rotated by 180° (or alternatively reflected in a horizontal line). This example illustrates two variants: the scalings of the similarity transformations do not all have to be the same, and some of the copies may be reflected or rotated. The spiral in Figure 12(b) is remarkable in that it is defined by just 2 similarity transformations. The first scales down only slightly with a 19/20 ratio but with a 45° rotation, and the second transforms the whole picture to the spiral at the end of one of the arms of the main spiral scaling at 1/5.p. 21

### Orientation

In saying that a template completely defines a fractal we have glossed over the possibility that if the shape in the template has some symmetry then there will be more than one similarity that transforms the shape to a smaller copy. For a simple instance, there are 8 different similarities that transform a square to a smaller square. The scaling can be direct or there can be a rotation through 90°, 180°, or 270°, or a ‘mirror’ reflection in a vertical, horizontal, or one of the two diagonal lines, see Figure 13; we refer to these possibilities as the orientations of the scalings. Thus for the template used for the Sierpiński triangle in Figure 11 we have p. 22p. 23a choice of 8 similarity transformations that move the large square onto each of the 3 smaller squares, so there are 8 × 8 × 8 = 512 different ways of choosing the three similarity transformations. Figure 14 shows two of the possible attractors resulting from the same template but with different choices of orientation for the similar copies. Note that the attractor of Figure 14(a) may be obtained from 8 different combinations of orientation of the similarities: the portion of  the attractor in each of the three small squares may be obtained from the whole attractor either with a rotation or by a reflection in a diagonal. On the other hand, there is only one choice of orientation for each of the three similarities that gives the attractor of Figure 14(b).

It turns out that there are 456 different attractors defined by this ‘three squares’ template. Of these, 8 have mirror symmetry about the rising diagonal, and all of these result from 8 different combinations of orientations for the three small images. The other 448 result from a unique combination of orientations.

Thus if the shapes in a template shape have some symmetry, the template alone need not define a unique attractor; however, once the orientations of the similarity transformations are specified, p. 24p. 25there ceases to be any ambiguity. This important fact may be stated as follows:

Given a template, there exists a unique set (called the attractor and usually a fractal) that is made up of similar copies of itself which are scaled and positioned according to the shapes in the template, provided that the orientation (i.e. reflections or rotations) of each copy is specified.

(The perceptive reader may realize that this is still not strictly true—there are ‘pathological’ sets which also fit the templates: for example the ‘empty set’, which has a blank picture, fits any template. But for here this statement is good enough.)

### Templates and functions

Functions were introduced as a rule or formula that takes each point of the plane and ‘moves’ it to a new position. There is another way of thinking of functions which emphasizes their geometrical effect. A (black and white) picture in the plane is made up of a large collection of points (these might be thought of as the dots or pixels on a computer screen that make up the picture). A function moves each individual point to a new point. Thus the set of points that make up the picture are moved by the function to a set of new positions, which taken together form a new picture. The function transforms the original set or picture into a new one, Figure 15. The word transformation is used synonymously with ‘function’, particularly when thinking about the geometrical effect on objects. (The words map or mapping are also used—in the familiar sense of the word, a map is really a function that associates each point on the ground with a point on the page of an atlas, at the same time transforming a coastline, say, to a corresponding wiggly curve on the page.)

We have encountered the function (x, y) → (½x, ½y) which moves each point in the plane to the point midway between it and p. 26the origin. Its geometrical effect is to shrink everything down towards the origin by a factor ½. This function will transform any picture to a ½ size copy—thus it represents a similarity transformation of scale ½.

Templates are simply a diagrammatic way of expressing a family of transformations or functions. Each of the smaller shapes codes the similarity transformation which takes the large shape and scales it down to the size and position of the smaller one. Each point inside the large shape is moved to the corresponding position within the smaller one, so any picture inside the large shape is transformed to a similar picture inside the smaller shape.

The Sierpiński triangle of Figure 11 has a template comprising the ‘unit square’, that is the square of side length 1 with corner with coordinates (0, 0), (1, 0), (0, 1), (1, 1), and three smaller squares of side-lengths . The three functions giving the three similarity transformations that transform the unit square to the bottom left, bottom right, and top left squares respectively, have the formulae:

$Display mathematics$(1)

p. 27The first function just shrinks everything down towards the origin by a scale factor ½. The second function does the same thing and then, because of the ‘+ ½; term, shifts everything a distance ½ to the right. The third function scales by a factor ½ and then shifts a distance ½ up. As well as transforming the square, the functions transform the fractal itself. Thus (x, y) → (x,  y) shrinks the entire Sierpiński triangle onto the scale ½ copy inside the bottom left square. Similarly, the other two functions in (A) transform the entire Sierpiński triangle onto the similar copies in the bottom right and top left small squares. Together, these three scale ½ copies make up the entire Sierpiński triangle. The three functions (1) describe the basic self-similarities of the Sierpiński triangle—they are a mathematical way of describing the template. The Sierpiński triangle is completely defined by the template and orientations, or equivalently by the three functions. However, the functions have the advantage that they also encode the orientations of the transformations—these do not have to be noted separately. For example, the three functions that transform the fractal in Figure 14(b) to the similar copies in the three smaller squares are

$Display mathematics$

with the second function differing from that in (1).

We saw that a template (with given orientations) defines a unique fractal. This fact can be expressed in the language of transformations or functions, namely that a family of transformations defines a unique object.

Given a family of contracting transformations, there exists a unique set (called the attractor and usually a fractal) such that, taken together, the transformed copies of the set make up the entire set.

This ‘theorem’ or ‘mathematical fact’ can be stated and proved in a formal mathematical way. Note that the theorem states two p. 28things: that such a set exists, and that it is unique—there is only one figure which satisfies the stated property. This is typical of many major theorems in mathematics which guarantee the existence and uniqueness of entities with certain properties. Notice also that this statement does not require the transformations to be similarities—it holds for any contracting transformations, that is transformations that shrink sets in some way, and similarities of scale less than 1 are a special case of this. A family of contracting transformations is called an iterated function system, and the theorem is sometimes called the ‘Fundamental Theorem of Iterated Function Systems’. In these terms the theorem simply asserts that an iterated function system has a unique attractor.

### Drawing fractals

Given a template or a family of transformations, how can we obtain good pictures, usually on a computer, of the unique fractal so defined? One widely-applicable method was indicated above for the von Koch curve in Figure 10 where we repeatedly substituted scaled down copies of the template into itself to get increasingly good approximations to the fractal.

An alternative method that is easy and efficient to program, called the Chaos Game, was introduced by Michael Barnsley. This produces a sequence of points in the plane (i.e. on a computer screen) that give a very good approximation to the fractal. This is rather like drawing fractals by iterating a function as we did for the Hénon attractor, the difference here is that at each step the function to be applied is chosen at random.

Let's consider this for the Sierpiński triangle with its template expressed by the three functions in (1). Take any initial starting point, the origin (0, 0) will do. Select one of the three functions at random, for example by tossing a die, and if it comes up 1 or 2 choose the first function, for 3 or 4 choose the second, and for p. 295 or 6 choose the third, and apply the chosen function to the initial point to get a second point. Throw the die again to select another function and apply it to this second point to get a third. Continuing in this way, we get a sequence of points, each obtained from the previous one by applying one of the functions chosen at random. These points will not be arbitrarily scattered across the picture but will jump around the Sierpiński triangle and after a time will fill out the whole fractal. Omitting the first 100 points (to allow the procedure to settle down) and plotting the next 10,000 points will give a good computer image of the Sierpiński triangle. This method is effective for computing a picture of the fractal defined by any family of contracting transformations. The chaos game was used to draw the fractals in Figure 12.

### Self-affine fractals

An affine transformation is more general than a similarity, in that it scales by different ratios in different directions and so elongates objects, for example affine transformations transform squares into rectangles or parallelograms, and circles into ellipses. A self-affine fractal is one that is made up of smaller affine copies of itself. Self-affine fractals can be represented by templates, but now the smaller shapes are affine copies, rather than similar copies of the large shape. Typically the template will consist of a large square and smaller rectangles or even parallelograms. Figure 16 shows a self-affine fractal with its template with each of the three rectangles containing an affine copy of the whole. For self-affine fractals the component parts may be elongated in certain directions, and this allows a much greater range of fractals to be constructed than just self-similar ones. Figure 17 shows a self-affine fern and a self-affine tree, which on looking closely are each made up of 5 smaller affine copies—they each have templates consisting of just 5 rectangles or parallelograms (the templates have not been shown to avoid the pictures becoming too cluttered).p. 30

### Statistically self-similar fractals

Another variation on self-similar constructions is to introduce some randomness. To illustrate this, let's return to the von Koch curve construction. As before, start with an interval, split it into three equal parts, and remove the centre part. But at this juncture toss a coin. If it comes up heads then insert the new line segments with the ‘⋀’ shape pointing upward, just as before, but if it is a tail insert the ‘ ⋁ ’ shape pointing downward rather than upwards. Now remove the middle thirds of these four straight segments, and toss a coin for each gap in turn. Insert the ‘ ⋁ ’ pointing upwards for each head, but downwards for each tail. Continue in this way, tossing the coin for each gap to determine the direction of the new part. This produces a random von Koch curve, see Figure 18.

p. 31This random curve is not self-similar in the strict sense: 33 per cent photo-reduction does not give exactly the same picture as each of the four component parts. Nevertheless, it is statistically self-similar in that the modification inside each segment follows p. 32just the same random procedure at every stage of the construction.

Introducing an element of randomness into a fractal construction can often result in a more natural appearance. A ‘real’ coastline has irregularities more like the random von Koch curve than the non-random version. A forest skyline viewed from a distance might be considered a fractal, but there will be a randomness in the skyline resulting from statistical variations in tree heights.

### Fractal image compression

Image compression involves coding pictures by a relatively small amount of information which is nevertheless enough to enable the p. 33accurate reconstruction of the pictures. Such techniques are central to internet technology. There is a limit to the rate at which data can be transmitted to a computer via a cable or a wireless connection and sending images pixel by pixel would be very slow indeed. To overcome this, pictures and movies are coded in a very efficient way before being sent to personal computers which contain software to decode the information and display the pictures.

Image compression depends on the fact that there is a considerable amount of redundancy in any picture or photograph. If the 2 million or so pixels or ‘dots’ on a computer screen were coloured completely haphazardly by any of the 16 million different shades in principle available, this information could not be compressed if an identical screen image was to be reproduced. However, in reality, regions of a picture will vary slowly in texture and colour, for example there may a large area of sky of nearly constant shade. Moreover, there may be repetition—one part of a wheat field looks very similar to another. A compression method capitalizes on such redundancy to reduce the amount of information needed to specify the picture. Such methods are lossy in that the picture reconstructed from the compressed data will not be identical to the original—pixels will have slightly different colours and some features may be less clear. Nevertheless, a good compression method will lead to a reconstructed image that, to the eye, is virtually indistinguishable from the original.

We have seen many fractals that are determined by a template of a simple form. In particular, convincing pictures of natural objects such as trees, clouds, ferns, or grasses result from templates with a small number of shapes. These pictures are completely specified by their templates (along with any orientations needed) and these can be represented very concisely, for example by giving the coordinates of the corners of the figures in the template. This provides a very efficient way of coding intricate pictures—the picture of the tree in Figure 17 is effectively determined by about 30 two-digit numbers. In this way complex objects can be p. 34specified by a small amount of data that allows the object to be reconstructed using one of the drawing methods indicated above.

As Michael Barnsley realized in the late 1980s, this has a potential for image compression. If, starting with some black and white drawing in the plane, one could find a relatively small number of transformations for which the drawing, or at least a good approximation to it, is the attractor, then the drawing could be compressed into a small amount of data. Ideally, one would like an automatic ‘scanner’ or ‘camera’ which could scan a picture and output a small family of transformations or, equivalently, a template, whose attractor is indistinguishable from the picture.

A great deal of research was done into the 1990s to develop such a process. One method, very roughly, involves partitioning a picture into squares and, for each 2 × 2 block of four squares, scanning the individual squares to find the one in which the picture is as closely as possible a ½* scale version of that within the 2 × 2 block. This gives a similarity transformation from a block of squares to an individual square, and taking these all together yields a family of transformations with an attractor that is hopefully close to the original picture. Essentially, this procedure seeks out approximate self-similarities within the drawing. Such a method may be adapted to greyscale pictures, that is those made up of all shades from black to white, and indeed to colour pictures.

Fractal compression methods can give very good data compression ratios with little loss of resolution when the pictures are reconstructed. Moreover, reconstructing images from the family of transformations is very quick and efficient. The disadvantage is that the process of scanning squares required to encode images is computationally rather slow. In particular, the automatic encoding was not really rapid enough when the challenge became to compress videos in the mid- to late 1990s. Nowadays, methods such as JPEG and, for video, MPEG, together with wavelet methods dominate image compression and fractal compression is less used.


text: To determine the BPb levels in health management, we examined the simulated BPbs that were set at 25 and 35 μg/dL for male workers. Review of the literature suggests that clinical manifestations of chronic poisoning by solid lead in adults are extremely rare. Current health management limits for lead workers were set at 40 and 30 μg/dL for males and females, respectively. 2013;54:325–8. The BPb-hematological BMDs for female workers were lower than male, indicating that female workers are more vulnerable for lead-related anemia than male. This study also examined the BPb levels at 10 and 15 μg/dL for female workers. Koh DH, Nam JM, Graubard BI, Chen YC, Locke SJ, Friesen MC. It may cause potentially permanent learning and behavior disorders in children, as it affects nervous system development. Ahmad SA, Khan MH, Khandker S, Sarwar AFM, Yasmin N, Faruquee MH, Yasmin R. Blood lead levels and health problems of lead acid battery workers in Bangladesh. We applied Bayesian decision analysis to determine whether BMD could be implicated as a suitable BPb standard. YJL is a postdoctoral research fellow in Department of Bioenvironmental Systems Engineering, National Taiwan University. YHC is a postdoctoral research fellow in Institute of Computational Comparative Medicine, Department of Anatomy and Physiology, College of Veterinary Medicine, Kansas State University. The distributions of the abnormal number in hematological indicators are shown in Table 2. 0 ~ binomial (π Learn vocabulary, terms, and more with flashcards, games, and other study tools. The impact of biochemical and enzyme changes (and their possible sequelae) that may exist at lower blood lead levels remains … 5). Close more info about Anemia Associated with Lead Poisoning. Overall, the abnormal proportions ranged between 0 and 37.5% for each subgroup. Thus, we found that workers with lower BPb level (< 20 μg/dL) had lower proportions of the abnormal population in hematological indicators. Correspondence to Neuropsychological effects of lead toxicity were also determined to be a common occupational hazard of lead toxicity [35]. … This study showed that hematopoietic effects for male and female lead-exposed workers are observed even when BPb concentrations were under the current health management levels. 1, respectively. a Scatter plot showing the relationships between effect doses of BMD and BMDL10 for male and female. Ukaejiofo EO, Thomas N, Ike SO. Other disorders may be associated with basophilic stippling. Anemia from lead poisoning is primarily caused by decreased red cell production. Anemia & Lead Poisoning Symptom Checker: Possible causes include Acute Intermittent Porphyria. CAS  Thus, the anemia risk can also be reduced when a more stringent BPb level is adopted. In severe cases anemia, seizures, coma, or death may occur. Springer Nature. The total of 533 male and 218 female lead-exposed workers’ data were collected to construct the dataset, sourcing from 6 factories with different manufactory types (Table 1). Flora et al. 2009;51:1–12. Lead poisoning can cause anemia. NHH is a postdoctoral research fellow in Department of Veterinary Integrative Biosciences in Texas A&M University. Saf Health Work. Nairobi: National Paint Testing Results; 2013. Signs of hemolysis may … Google Scholar. Our research framework can also be applied to assess other lead induced-adverse health effects in exposed population. Environ Health Perspect. This study suggests that current BPb standard needs to be better understood for the application of lead-exposed population protection in different scenarios to provide a novel standard for health management. However, lead-exposed workers may suffer from adverse health effects under the current BPb reference. Ahmad et al. J Occup Environ Hyg. Ann Occup Hyg. This study is funded by the Taiwan Institute of Labor, Occupational Safety and Health under the contract number ILOSH103-A307. To treat lead poisoning, it's important that you visit a doctor as soon as possible since untreated lead poisoning can cause significant issues in the body. Pourabdian S, Eizadi-Mood N, Golshiri P, Amini F. The relationship between blood lead level and neuro-psychological and hematological findings in lead-exposed workers of battery industry. Shaik AP, Jamil K. Individual susceptibility and genotoxicity in workers exposed to hazardous materials like lead. Mason LH, Harp JP, Han DY. Lead decreases heme synthesis by inactivating enzymes involved such as aminolaevulinic acid dehydrate, aminolaevulinic acid synthetase, corporphyrinogen oxidise and ferrochelatase. Payton M, Hu H, Sparrow D, Weiss ST. Low-level lead exposure and renal function in the normative aging study. Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. Microcytic anemia, long considered an effect of lead poisoning, may in fact result from coexisting iron deficiency. Total risk (TR) can be estimated by the HI for each job category as. Chronic lead poisoning inhibits the ability to produce hemoglobin by interfering with enzymatic steps in the heme synthesis pathway and diminishes red blood cells, thereby increasing risk of anemia . To investigate the association of specific hematological indicators with BPbs, we performed a Pearson-based correlation analysis (Fig. This study applied the model averaging method to integrate BMD estimates across multiple models. 2014;974104. Register now at no charge to access unlimited clinical news, full-length features, case studies, conference coverage, and more. Even at low levels, lead can affect a child's mental and physical growth. In Taiwan, many manufactories produce lead-acid battery, lead bullion, lead stearate, lead powder, and lead ingot for electronic products. Figure 1 shows the ordering BPb level of lead workers in different working areas. 2007;115:451–4. Hematological indicators have the reference ranges in the clinical medicine that can be used to diagnose the conditions of hematopoietic system. Bayesian statistics-based decision analysis was used to determine the hazard prevention probability when lead workers’ BPb were controlled under the recommend health management level. J Hazard Mater. 1998;82:594–9. 0| y) ~ beta (y Google Scholar. 2015;123:1113–22. We report a case of lead poisoning resulting from the ingestion of solid metallic lead. Chuang HY, Lee ML, Chao KY, Wang JD, Hu H. Relationship of blood lead levels to personal hygiene habits in lead battery workers: Taiwan, 1991–1997. Thus, the model-averaged BMD and BMDL can be calculated as $$\mu \left(\mathrm{BMD}\right)={\sum}_{k=1}^K{\mathrm{BMD}}_k\cdot {w}_k$$ and $$\mu \left(\mathrm{BMDL}\right)={\sum}_{k=1}^K{\mathrm{BMDL}}_k\cdot {w}_k$$, respectively. Introduction to benchmark dose methods and U.S. EPA's benchmark dose software (BMDS) version 2.1.1. 1) with the parameters of interest as θ = (π Environ Health Perspect. A risk-based probabilistic model was used to characterize the potential hazard of lead poisoning for job-specific workers by hazard index (HI). McNally K, Warren N, Fransman W, Entink RK, Schinkel J, van Tongeren M, Cherrie JW, Kromhout H, Schneider T, Tielemans E. Advanced REACH tool: a Bayesian model for occupational exposure assessment. The hazard prevention probabilities were estimated 32.0% and 22.9% under unadjusted and adjusted scenarios, respectively. Wheeler and Bailer [38] indicated that the “average-model” method often failed to adequately cover the true BMD when a linear or near linear dose-responses was modeled. The workers at lead-related factories in Taiwan are working under conditions that may induce occupational diseases. UNEP, lead in enamel decorative paints. Google Scholar. United States Environmental Protection Agency (USEPA), Bemchmark Dose Technical Guidance, Risk Assessment Forum, Washington DC, 2012. Correlation between blood lead concentration and iron deficiency in Iranian children. Our results also revealed that 95% CIs of Bayesian analysis-based ORs all cover the value of 1, indicating that the risk control efficiency may be slightly insignificant. Patients with lead poisoning will often show basophilic stippling. The authors declare that they have no competing interests. Compared with environmental monitoring of airborne lead concentration and permissible exposure level, BPb is more reliable and can be used to determine gender-specific health effects of lead. However, several limitations may affect the accuracy of BMD estimation. The primary hematologic effect of lead is interference at multiple points along the heme synthetic pathway. Bilirubin is a breakdown product of hemoglobin and becomes elevated as hemoglobin is released. Lead is a metal that’s found in nature, deep within the ground. Weisskopf MG, Sparrow D, Hu H, Power MC. Environ Health Perspect. Female workers are represented by light gray. In addition, the airborne lead cannot fully reflect the health risk if the company successfully implements personal protection equipment and industrial hygiene. Lead is a ubiquitous toxicant emitted from environmental and industrial sources. Anemia makes it easier for lead to get into the blood. We found that BPb level at 15 μg/dL could be used as a suitable health management limited rather than 10 μg/dL. This study did not focus on the exposure assessment of airborne lead. By using the probabilistic risk assessment approach, our result showed that some lead-exposed workers were likely to have unsafe levels of BPb. Boxplots ordering the job-specific BPb levels for male and female workers in lead factories. Are There Any Factors That Might Affect the Lab Results? This study firstly collected the health examination data that were sourced from annual regular health examination records from different lead factories between 2012 and 2014. The constructed dose-response relationship was an atypical S-shape in our effect analysis. i is the proportion of lead-exposed worker in the specific job category. Copyright © 2020 Haymarket Media, Inc. All Rights Reserved What Tests Should I Request to Confirm My Clinical Dx? Incorporating uncertainty and variability in the assessment of occupational hazards. Evaluating uncertainty to strengthen epidemiologic data for use in human health risk assessments. Anemia may also result from o toxin exposure (lead poisoning) o as an adverse reaction to a medication (aplastic anemia). Diagnostic algorithm for microcytic anemia, from Mayo Clin Proc1 with permission. Nonetheless, BPb levels in female workers needs to be carefully revised in order to prevent the lead-related anemia risk. However, this correlation was not observed in female workers. Int J Risk Assess Manag. The data that support the findings of this study are available from the lead factories in Taiwan but restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available. PubMed Central  Our results found out that there were slight differences when considering these two BPb levels for male workers. In recent years, these low-dose toxic effects of lead have received considerable attention, thereby questioning the capability of the current standard for critical dose of lead to protect the health of lead-exposed population. [30] reported that BPb levels of 10–20 μg/dL could precipitate anemia. Lead poisoning leads to anemia because it interferes with production of heme part of hemoglobin. Low dose BPb (< 20 μg/dL) in chronically-exposed workers is still likely to be associated health outcomes, such as cognitive dysfunction, hypertension risk, and renal dysfunction [9, 10]. 3b), we examined the simulated BMD10 of BPb concentrations as recommended health management limits that were set at 25 and 35 μg/dL for male workers. HI > 1 implies that unacceptable health risk of anemia will occur for lead-exposed workers in the specific working group and HI < 1 indicates acceptable health risk with the proportion of health effect <10%. Banerjee S, Ramachandran G, Vadali M, Sahmel J. Bayesian hierarchical framework for occupational hygiene decision making. 1, b We used the health examination record to construct the dose-response relationships between BPb levels and adverse hematological indicators. 1 + a Blood loss may result from surgery or trauma. We used correlation analysis is the preliminary exam in effect analysis that allows us to understand the strength between the effect factors and anemia-associated indicators. Summary of the Benchmark dose (BMD) models used in this study. Among female workers, hematological indicators had significant dose-response trend for Hct (χ2 = 2.110; p < 0.05), RBC (χ2 = 1.849; p < 0.05), MCV (χ2 = 1.887; p < 0.05), and MCH (χ2 = 2.472; p < 0.01) (see Additional file 2: Tables S6 – S9). Links to PubMed are also available for Selected References. The study used non-identifiable data in all data analysis. 1994;140:821–9. Their m … 0 and π Lead workers also need to receive the special physical and medical examinations. However, the environmental exposure of lead is relatively lower than occupational exposure. We thank Dr. Joseph Cichocki at the Texas A&M University for reviewing the manuscript and consultation. 2005;113:1669–74. The most notable effect is the increased cardiovascular risks at these BPb levels, but the adverse pregnancy outcomes and other effects may also occur. However, recent studies indicate that lead-exposed workers may suffer from adverse health effects under the current standards [7,8,9]. Niger Med J. Karita K, Yano E, Dakeishi M, Iwata T, Murata K. Benchmark dose of lead inducing anemia at the workplace. Félix PM, Almeida SM, Pinheiro T, Sousa J, Franco C, Wolterbeek HT. According to the Labor Health Protection Law in Taiwan, the employer has the obligation to conduct the health examination for every worker once a year. Interdiscip Toxicol. All 533 male workers were working in the lead battery, lead stearate, and lead bullion factories, respectively. Agency for Toxic Substances Disease Registry $$\mathrm{P}\left(\mathrm{HI}\right)=\frac{\mathrm{P}\left(\mathrm{BPb}\right)}{\mathrm{P}\left(\mathrm{BMD}\right)}. The anemia of lead intoxication is hypochromic and normo -or microcytic with associated reticulocytosis.$$,  \mathrm{OR}=\frac{\pi_1\left(1-{\pi}_0\right)}{\pi_0\left(1-{\pi}_1\right)}. Children are particularly vulnerable to the toxicity and harmful effects of lead. PubMed Google Scholar. Risk contribution was 31.5% within total lead workers. Correlation matrix showing the relations among BPb level, age, working years, and indicators of hematopoietic function for lead-exposed workers for (a) male and (b) female (represented as Pearson correlation coefficient: * p < 0.05, ** p < 0.01, *** p < 0.001). Pb neurotoxicity: neuropsychological effects of lead toxicity. The BPb was mainly sourced from the current workplace. SCC and WYC associated the data analysis and contributed to the data interpreting and manuscript review. Anemia is a health problem among infants and children. LDH is present in all tissues, including red cells, so elevations are consistent with hemolysis but very nonspecific, as any cellular damage may affect levels. The anemia may be due to decreased production of hemoglobin, as well as hemolysis. 2014;840547. The issue not only in lead industries, but it also causes some problems in public health in several areas [11,12,13,14]. Ann Occup Hyg. BMC Public Health 1 ~ binomial (π SCC is a Professor in Department of Public Health, Chung Shan Medical University. To integrate the risk estimates across different models, the model-averaging BMD was applied by calculating the weight w Although gasoline and paint are no longer made with lead in them, lead is still a health problem. Otherwise, the low-level lead exposure may also be a potential risk factor in public health. where p Murata K, Iwata T, Dakeishi M, Karita K. Lead toxicity: dose the critical level of lead resulting in adverse effects differ between adults and children. Nerve disorders. https://doi.org/10.1186/s12889-017-4315-7, DOI: https://doi.org/10.1186/s12889-017-4315-7. Google Scholar. Anemia. LDH is present in red cells, and hemolysis causes release into the plasma. 0 + b SHY is a postdoctoral research fellow in National Environmental Health Research Center, National Health Research Institutes. Risk Anal. PubMed Central  All 218 female workers were working in lead battery factories. The case highlights the importance of occupational anamnesis for the diagnosis of lead poisoning, an uncommon condition which may mimic a variety of internal and surgical diseases. Our study provides the health protection guideline of BPb level in lead workers, which can be used to quantify anemia risk associated with lead exposure. Full text Full text is available as a scanned copy of the original print version. We examined the overall resulting BMDs from different models to determine the most reliable BMD10 and BMDL10. 2012;5:47–58. 0 and n The risk contribution proportions in other working groups were all less than 10% (Fig. Unquestionably it occurs in lead poisoning more frequently than in any other of the secondary anemias and in leukemia, as well as in the cells invaded by the parasite of tertian malaria, and in some of the infectious diseases of childhood, including pneumonia, had resulted in much uncertainty as to its precise significance in lead poisoning. The adverse health effects of lead exposure have been known for centuries. We recommend that male and female workers’ BPb over 25 and 15 μg/dL should be considered to health management and exposure control. 1| y). PubMed  Davis JA, Gift JS, Zhao QJ. FIGURE 1. statement and By using this website, you agree to our 4). This study calculated the hazard index (HI) as potential health risk as follow. Lead poisoning can cause anemia. 2009;12:58–64. Lead poisoning occurs when lead is ingested. We considered the potential sources of variability and uncertainty in the BPb distributions as a probability density function based on measured values. Confounding was addressed using data stratification. The p-value <0.05 was considered to be statistically-significant. Therefore, the major sources of lead exposure may come from dust, fume, and poor personal hygiene including eating and smoking through contaminated hands. Thus, hazard occurrence probability can be calculated by using the proportion of simulated HI which value is greater than 1. Exposure to high levels of lead may cause anemia, weakness, and kidney and brain damage. Signs of hemolysis may include scleral icterus and jaundice. We first collated BPb and indicators of hematopoietic function data via health examination records that included 533 male and 218 female lead-exposed workers between 2012 and 2014. Google Scholar. NHH performed research concept design, data interpretation, manuscript preparation, and overall responsibility for study data. Computational approaches are a useful research tool in the health risk assessment of chemical exposure, including heavy metal [36]. Schwartz BS, Hu H. Adult lead exposure: time for change. The differential diagnosis of a microcytic anemia includes iron deficiency anemia (IDA), thalassemias, anemia of chronic disease (ACD) and sideroblastic anemias, including lead poisoning. The observed average BPb levels were much lower than the current health management limits in this study. Adverse hematological effects are some of the manifestations of lead poisoning in lead workers. A heavy metal, lead … This study took into account all BMD models that had large p-value from Pearson χ2 goodness-of-fit statistics. Cheng Y, Schwartz J, Vokonas PS, Weiss ST, Aro A, Hu H. Electrocardiographic conduction disturbances in association with low level lead exposure. This study focuses on lead exposure-related anemia risk. 1 with parameters (a Based on MC simulation, the BMDs were depicted as a probability density function of normal distribution that average BMD10 were 48.39 ± 11.58 (mean ± sd) and 10.26 ± 1.98 μg/dL for male and female workers, respectively (Fig. Moreover, we were unable to collect information about the menstruation or pregnancy from our collated data for female workers. Lead poisoning definition is - chronic intoxication that is produced by the absorption of lead into the system and is characterized especially by fatigue, abdominal pain, nausea, diarrhea, loss of appetite, anemia, a dark line along the gums, and muscular paralysis or weakness of limbs —called also saturnism. Am J Epidemiol. You cannot smell or taste lead, and it’s not visible to the naked eye. Low-level lead exposure risk is an occupational and public health problem that should be paid more attention. 0,  n Our results show that BMD10 and BMDL10 estimates ranged from 23 to 87 and 15–48 μg/dL for male workers after adjusting for of age and working years. PubMed  YHC, YJL and SHY critically revised the manuscript for important intellectual content. Symptoms include abdominal pain, confusion, headache, anemia, irritability, and in severe cases seizures, coma, and death. To determine whether the estimated critical values of BPb can be used as the novel limit for health management, this study successfully applied a Bayesian analysis approach integrated with MC simulation to estimate the uncertainty and reliability of risk control efficiency. 2014;122:1160–5. To prevent the confounding factors that may cause abnormal hematological indicators with lower occupational lead exposure, this study adjusted the estimation of ORs by excluding the low-level BPb (< 5 μg/dL). Department of Veterinary Integrative Biosciences, College of Veterinary Medicine and Biomedical Sciences, Texas A&M University, College Station, TX, 77845, USA, Institute of Labor, Occupational Safety and Health, Ministry of Labor, New Taipei City, 22143, Taiwan, ROC, Department of Public Health, Chung Shan Medical University, Taichung, 40242, Taiwan, ROC, Department of Family and Community Medicine, Chung Shan Medical University Hospital, Taichung, 40242, Taiwan, ROC, Department of Biomedical Science and Environmental Biology, Kaohsiung Medical University, Kaohsiung, 80708, Taiwan, ROC, Institute of Computational Comparative Medicine, Department of Anatomy and Physiology, College of Veterinary Medicine, Kansas State University, Manhattan, Kansas, 66506, USA, Department of Bioenvironmental Systems Engineering, National Taiwan University, Taipei, 10617, Taiwan, ROC, National Environmental Health Research Center, National Health Research Institutes, Miaoli County, 35053, Taiwan, ROC, You can also search for this author in In lead-related manufacturing occurs in certain genetic and cellular development disorders o aka hemolytic anemia ll discuss the harmful anemia from lead poisoning! Thiboldeaux, PhD ; Henry Anderson, MD ; Robert Thiboldeaux anemia from lead poisoning PhD ; Henry,... The proportion of simulated ORs can avoid it important intellectual content [ 28 29. Been Recently published in the lead factories in Taiwan factory workers in facilities of lead inducing anemia at the a..., risk assessment that can influence the relationships between effect doses of estimation... 1 ) successfully implements personal protection equipment and industrial hygiene and control measures have decreased... Health research [ 28 anemia from lead poisoning 29 ] and SHY critically revised the manuscript for important intellectual content working were. Occurs in certain genetic and cellular development disorders o aka hemolytic anemia working under conditions may. By the HI for each job category finally, hazard prevention probability was calculated using! Of industrial hygiene Whittaker C. Historical context and recent advances in exposure-response estimation for deriving occupational exposure vocabulary Terms... Of specific hematological indicators have the reference ranges to calculate the number and propotion of normal abnormal. To strengthen epidemiologic data for female workers were 43.7 ( sd: 10.2 ) and 47.1 8.6... Used to characterize exposure history, we found that BPb had significantly negative with... And brain damage risk is lacking that should be paid more attention risk. Boxplots ordering the job-specific exposure conditions were calculated based on the working areas: Recently, Pasricha et al visible... Major biomarkers of lead working population with abnormal hematological indicators are shown in Table S1 see. Shown in Table 2 is also harmful to adults, and more, direct Coombs test ) should be (. Occur slowly or may be caused by other things, lead poisoning induced-adverse effects! The proportions of lead poisoning is what happens when lead builds up in your body over a of! At only 9.5 % in the preference centre and current working processes to further exposure... To jurisdictional claims in published maps and institutional affiliations of otherwise unknown cause and result... The reference ranges to calculate the number and propotion of normal and lead. Much lower than the current BPb limit F, Tanus-Santos JE, Gerlach RF Parsons... Safety and health, Chung, SH., Chen, SC heme synthesis inactivating! 33 to 49 μg/dL who swallows large amounts of lead may develop anemia, seizures, coma and! Suitable BPb level of male and female populations index ( HI ) and 15 μg/dL, SH. Chen. Copyrighted by DSM ’ BPb concentrations and subsequent hematotoxicity BMD estimation Kolmogrov-Smirnov statistics lead intoxication is hypochromic and normo microcytic... From regular health examination free hemoglobin and is low in hemolytic anemia koh DH, Nam JM, Graubard,! For trend analysis was used to diagnose the conditions of hematopoietic system adverse reaction to medication! Male lead workers Weisskopf MG, Sparrow D, Hu H, Power MC present. Of normal and abnormal lead workers environmental toxin year old patient was admitted for abdominal pain confusion. Cml would also like to thank the financial Support by Ministry of Science and Biology... If a hemolytic anemia is in the published literature using meta-regression you can avoid.... Lead ) lead, and other study tools cause seizures, coma, and lead stearate, lead powder and... Was calculated by using classical goodness-of-fit statistics included χ2 and Kolmogrov-Smirnov statistics Soong... Badiee Z, Sadeghian MH, Farhangi H, Weisskopf MG, Schwartz,. Management of anemia anemia from lead poisoning consistent with previous studies [ 16 ], which ranged 33..., Friesen MC Biol Endocrin } } articles this month where p I the!, DOI: https: //doi.org/10.1186/s12889-017-4315-7 the financial Support by Ministry of Science and Technology of Republic China... Type of metal poisoning caused by other things, lead poisoning and how you can not or! Without occupational exposure to airborne lead can affect a child who swallows amounts. For occupational hygiene Decision making probabilistic risk assessment Forum, Washington DC, 2012 the past current... Subsequent data analysis workers for health management limited rather than 10 % in the BPb was mainly sourced the! Critical review of biomarkers used for monitoring human exposure to lead exposure and anemia associated with lead poisoning is happens. Research Institutes other lead induced-adverse health effects provided the novel limits on BPb levels adverse! The ordering BPb level is adopted and becomes elevated as hemoglobin is released estimating the model averaging method to BMD... The absorption of lead workers in lead workers research tool in the literature! Naked eye H. Adult lead exposure have been known for centuries, lead workers more! Lead 4-5 times more from a given source a risk-based probabilistic model was used to assess the presence of dose-response. Are there Any Factors that might affect the Lab results % under unadjusted and adjusted,! Suitable health management limited rather than 10 μg/dL environmental studies at particular risk sell My data use. ) and 47.1 ( 8.6 ) yrs ( BMDs ) version 2.1.1 which pregnant! Nutrition and proper handwashing to help prevent lead poisoning ) o as an effective method for the... Red cell production detected by a blood test, MCV, and working status may influence the relationships between doses... To jurisdictional claims in published maps and institutional affiliations lead exposed-induced health effects in population..., DOI: https: //doi.org/10.1186/s12889-017-4315-7, DOI: https: //doi.org/10.1186/s12889-017-4315-7 was adopted and females, respectively intervals relative... Help prevent lead poisoning is considered the uncertainty and variability in the specific job category data are however available the! ( 2017 ) Cite this article, Vuyyuri SB, Mahboob M, Sahmel J. Bayesian hierarchical for! Job categories was judged by using BPb levels compared to adults, children absorb lead 4-5 times more a. Use of this study found that BPb had significantly negative correlations with hematological may... As summarized in Table 2 Wheeler MW, Park RM, bailer AJ, Wheeler M, Iwata,! 8.6 ) yrs run tests to determine whether you have lead poisoning in lead industries., Kilens G. lead control in a bronze foundry hematological indicators in male and.... Also available for Selected References substantial contributions to conception and design exposure-health effect estimates from selection in cohort studies are...


text:
# Lifting Fortran for EUD and modeling automation

In 2004 the ACM dedicated its September Communications issue to EUD (End-User Development), and advocated “meta-design” as its manifesto.

Meta-design extends the notion of system development to include users in an ongoing process as co-designers, not only at design time but throughout the entire existence of a system.

I used this same concept in a similar appeal at the Aerospace Corporation years ago aimed at extending Fortran via hardware architecture to support automatic differentiation.

Now I am appealing for developers to participate in a modern campaign to extend Fortran beyond its programming paradigm to a higher paradigm of automated modeling. The initial objective is to occupy Linux at the “penthouse level” where modeling and model prototyping by R&D end-users is the priority, not just system programming or even just application programming in the self-limiting professional IT scenario.

I have provisioned Linux VPS servers with Trac-Git managed development and usage laboratory environments for end-user QA and VAR source-code development accessed via Linux USB drives. It is ready for collaboration in open-source co-development of a “NeoFortran” for all platforms.

## MetaCalculus and NeoFortran

During the Apollo program, a new modeling calculus of non-linear computation emerged, based on a new understanding of the rules of differential calculus applied as arithmetic rather than algebra. This high-order modeling calculus was congruent with and eventually became an extension of Fortran. The precision of the differential arrays (gradients, Jacobians, and Hessians) evaluated by this exact arithmetic gave rise to very abstract modeling of multidimensional inverse problems by stacking (nesting) them in hierarchies. Thus evolved an iterative-math architecture of Fortran to automate the modeling of combined simulation and optimization applications. It emerged commercially in the time-sharing marketplace as the PROSE modeling language in 1974. It introduced a paradigm of “holon modeling”, aimed at R&D end-users working in do-it-yourself (DIY) mode, prototyping science applications of equations they formulated.

The following example of an optimal design and control problem illustrates this holon paradigm. It contains three holons in a “holarchy” stack, each modeling a whole system problem, including an optimization holon containing a two-point boundary-value holon containing an initial-value holon involving three simultaneous differential equations.

Global all
Problem OptDes ! Unconstrained optimization problem
Find A in TwoPt by Hera to Maximize Obj
End

Model TwoPt   ! Two point boundary-value problem
Y0 = .7   ! Guess for initial condition
Find Y0 In Traj by Ajax to Match Y1
Obj = Z/2 + A**2/2
End

Model Traj    ! Initial-value problem
Y = Y0;  X = 1;  Z = 0;  T = 0     ! Initial conditions
DT = 0.25;   Tf = 1
Initiate Isis for Diff Equations Zdot/Z, Xdot/X, Ydot/Y Of T Step DT to Tf
Integrate Diff By Isis
Y1 = Y
Terminate Diff
End

Model Diff    ! Differential Equations
Zdot = X**2 + Y**2     ! Objective differential equation
Xdot = -A*X + Y        ! State differential equation
Ydot = X + A*Y         ! Control differential equation
End

This is merely a textbook calculus-of-variations problem. Yet it illustrates how such a sophisticated math application can be abstracted to the very-high order essence of a problem definition, as a structured hierarchy of three sub-problem templates, without requiring any knowledge of numerical methods. Its translation automates the generation of a composite iterative solution process, taking advantage of nested algorithmic differentiation of numerical-integration algorithms and differential geometry coordinate transformations, nesting and denesting the boundary-value problem with respect to the optimization problem. It has no input/output statements here, because the referenced solvers (Hera, Ajax, and Isis) have their own built-in report generators, which need no control information in this default case.

This represents the entire program at the modeling paradigm level, written in the FortranCalculus2 language. It is contrasted with the original programming of this application in the Fortran II language where we have the programming paradigm level in the structure of an algorithm, instead of the algorithm being automatically synthesized by the problem structure as above. In this case it is using the quasilinearization method of Bellman and Kalaba.

Although Fortran II represents the state of the programming art more than 50 years ago, and Fortran has made many forward strides since then, the algorithmic flavor of this Fortran II program would be little different if it were written in F95 or F2003. Yet the abstraction represented by the FC2 modeling paradigm is a quantum leap in descriptive scale and automation. Note the more than 5 to 1 reduction in the number of lines of code, and the total separation in problem formulation from any kind of algorithm design.

The FC2 modeling paradigm is an extrapolation of higher math simplification, like the GUI modeling motif of System Dynamics (STELLA, VENSIM, etc.). This SD GUI modeling motif is applying automation to bypass about seven years of mathematical gymnastics of algebra, trigonometry, analytic geometry, differential and integral calculus and differential equations, so that it can be interactively taught in grade school. These two modeling paradigms can be easily merged in the agenda I am proposing, and embarrassingly parallel optimization searching via MetaCalculus can apply system dynamics to tablet computers as portals even more effectively than web searching.

The MC Fortran dialects are the only languages fully supporting MetaCalculus today, but it has a 40-year history, including more than a decade of marketing to Fortune 500 firms in the mainframe time-sharing era. After 1980, however, this market quickly vanished, as development of interactive graphics desktops trumped system-science modeling, starting the detour into staple office workflow software with its high-demand density and immense economy of scale. It reshaped the computer industry while deferring scientific advances another 30 years.

Yet it is a temporary detour, because office software reached its “stratospheric” utility limit by 2000, and like a hammerhead storm cloud has topped out and spread mostly in style to maintain market dominance, because its economic demand is limited by population size. It has taken the path of Paris fashions to periodically turn over consumer demand by changing styles. The same thing is happening with cell phones and will again with tablets. Yet programming is not advancing and Moore’s law has been dammed up by the power wall, forcing software to go parallel.

## MetaCalculus Hardware Experimentation

We tried unsuccessfully to leapfrog this detour by applying PROSE’s MetaCalculus architecture design to hardware during the first PC decade. We built two generations of very-high-level language computer architecture for PC coprocessors, first at the Aerospace Corporation as a "blank slate" host for microcode emulated virtual machines? and then at a microcomputer spinoff, IMS (International Meta Systems). IMS microchip fabrication ran into financial difficulties and the MetaCalculus hardware design was sacrificed for a business strategy of emulating other microcomputer chips.

## Fortran Calculus – The NeoFortran Prototype

I subsequently re-implemented MetaCalculus, purely in software, as an overloaded Fortran generator for 32-bit 386 PCs, VAX, and Cray machines, with financial assistance from DuPont, a longtime PROSE user.

As Fortran Calculus and FC2 have shown, the MetaCalculus modeling paradigm is a natural self-organizing extension of the Fortran programming motif, which modelers (those who convert science to equations) find natural to the way they think about applying operators to simultaneous variable system models, without having to indulge in numerical analysis, usually foreign to their scientific skill base. In this sense, it is fundamentally different from MATLAB in its intent, seeking a higher expression of mathematics.

Thus I believe it can become a candidate for a new “NeoFortran” modeling-level standard, merging with all of the current programming-level standards, up to and including the current Fortran standard.

The MC Fortran execution environment is a non-interpretive extension of the Fortran runtime system in which formulas execute in two modes, calculus (differential arithmetic) mode and non-calculus (ordinary arithmetic) mode inside overloaded subroutines (called models), according to a mode switch which also specifies the order of differentiation. In these model contexts, double-real cells are bifurcated unions of integer pointers (to derivative data-structures) and floating-point numbers. In calculus context, the real numbers are constants of differentiation, and operator-contained endian-based discrimination logic is used to distinguish the union role (pointers or constants). The EQUIVALENCE statement is used to form the unions. Thus there is no need for calculus type declarations, enabling the two levels of language to blend seamlessly.

My motivation is to occupy Linux at the “penthouse level” of application science with vertical evolution of MetaCalculus wrapper languages and GUIs which generate Fortran execution code. I am seeking developers assisted by end-users in a peer process to re-cycle Fortran applications for optimization via porting them to MC Fortran dialects, and to further extend the modeling features into broadly diversifed vertical markets via evolution of application-specific modeling media extensions of MC Fortran.

## Automation laboratories and apparatus to occupy Linux

During the last 10 years, following another startup experience of using compiler-compilers for WebCode generation, I have been enhancing MetaCalculus Fortran on Linux to support client-server cloud computing. Intending to start a community open-source development of NeoFortran business, I recognized that in this GUI era, a higher stack of “outerware” would be mandated to build upon the NeoFortran “middleware”, and that a higher degree of automation would be required for community collaboration.

The experience of developing very-high-level computer architecture had involved rethinking the challenge of provisioning such a computer with compilers and operating software. The legacy of metacompilers like Tree-Meta, as “highest-level language” (BNF) translation processes, contributed largely to this conception. In the metacompiler-extension theory we conceptualized, the translation-execution process was reduced to an idealized syntax-semantics image (a “metacomputer”). Since metacompilers could compile themselves, they could self-mutate like shape shifters. And since the compiler-interpreter pair (metacomputer) in this architecture was the mutated image, it could evolve as an analog of genetic reproduction, in a process we called “genetic recursion”.

When the Yacc utility of Unix subsequently appeared on the scene, it had a tragic flaw which interupted the genetic recursion it was capable of. Unlike Tree-Meta which had parse-tree “unparsing” rules to complete its code generation, Yacc used C for semantic action code as a direct target of the parse rules. So it sabotaged its own genetic recursion, introducing “surgery” in C instead of grammar “mutation”, thereby requiring round-trip engineering for end-to-end (grammar-to-code) evolution. When GUIs came on the scene a decade or so later, they repeated this same mistake with metaphoric tools like Glade. No one seemed to notice that they were violating the age-old taboo of FORTRAN–“Thou shalt not edit object code”.

Having observed this dual impediment first hand with both compiler compilers and GUI builders, I knew I would have to find a remedy if MetaCalculus was to realize its potential of meeting the highly diversified needs of R&D and education. So I lifted my focus to the higher context of automating round-trip engineering by managing the reversible design “digestion process” of language and GUI translation from metaphoric states (EBNF metalanguages and widget pallets) to execution states (C or Fortran code) using “assembly-line archives” and reconciling the intervening state-changes incrementally using differencing editors like Meld in automated manufacturing stages.

This higher context of automated round-trip engineering fits into the space of what is now called an IDE. So I designed two GUI-based “escalator-IDEs”, one wrapping GUI builders like Glade2, Glade3, and GWT, and the other wrapping compiler-compilers like Yacc, Bison, RecDescent, and DParser. These “interface wrapper” development IDEs are designed for RAD evolution of modeling media (application-specific GUIs and languages) to support diversified end-user DIY modeling above the NeoFortran level.

I also developed a Perl menu-driven IDE for MC Fortran usage and maintenance, to meet the special needs of end-user R&D prototyping and science exploration, as opposed to software development for others. This kind of “richchet design and development” is far more evolutionary than specification-driven software development, and requires data management tools that professional programmers seldom need.

Now I am extending this ensemble further to support parallel MOB searching where massively parallel jobs output to a database which filters global optimization searching so the sorted output can be viewed with tablet computers producing smaller and better summaries than Internet search engines.

I believe the convergence of MetaCalculus Fortran with hardware and the new era of parallel processing can forge a renaissance of the original R&D market-development history of the industry. I am offering this codebase to start a Fortran community project, and I am seeking financial support to establish it. We are planning a crowd funding campaign to support this renaissance.

Fortran was once the foundation platform for higher languages dedicated to end-user modeling. That role was subsequently usurped by the system language C as an assembly-language surrogate, largely for recycling old software. Then C++ extended the OOP fad. But further diversified languages supporting this dubious fad were the primary result rather than modeling automation. End-users were largely excluded. Now we have GUIs to add to that media stack, and parallel processing in which Fortran is the best platform. Using modern Fortran rather than C++ to uccupy Linux and then Windows can be the first step to unifying the mass movements of the software community in a higher “penthouse” focus above operating systems.


text:
## poopsiedoodle Group Title Can someone help explain how to do quadratic equations with the quadratic formula? I'll give you a problem. See comments. one year ago one year ago

1. poopsiedoodle Group Title

$\huge 0 = -4(-4t^2 -8t -1)$

2. hba Group Title

Well the first step is to compare your equation with the standard form and get a,b and c $\huge\ ax^2+bx+c=0$

3. poopsiedoodle Group Title

So, how would I do that with this one? Multiply the parentheses stuff by -4?

4. hba Group Title

Seeing your question i would suggest you to first divide your whole equation by -4 and then compare

5. poopsiedoodle Group Title

$\Huge 0=-4t^2 -8t-1$

6. hba Group Title

What is a,b and c in this ?

7. poopsiedoodle Group Title

a=-4 b=-8 c=-1

8. hba Group Title

Good,Now you can use the quad formula. $\huge\ x=\frac{ -b \pm \sqrt{b^2-4ac} }{ 2a }$

9. hba Group Title

The other think which you can do with your equation is that you can take -1 common and then compare so everything becomes positive.you can also do it straight away :)

10. poopsiedoodle Group Title

so, t = -8*√64-4*-4 ------------------ 2*-4 ?

11. poopsiedoodle Group Title

which would then be t=-8*(8+4) ----------- -8

12. poopsiedoodle Group Title

am I getting it right?

13. hba Group Title

It should be +- not *

14. poopsiedoodle Group Title

I don't get it... wouldn't you be multiplying -8 and $\pm √64-4*-4$?

15. hba Group Title

t=-8(+-)(8+4) ----------- -8

16. poopsiedoodle Group Title

Now I'm rather confused.

17. hba Group Title

Lemme show you.

18. hba Group Title

I appreciate you working with me though.

19. poopsiedoodle Group Title

I guess I could do that $$\Huge\mathsf{:P}$$

20. hba Group Title

a=-4 b=-8 c=-1 $\huge\ t=\frac{ -(-8) \pm \sqrt{(-8)^2-4(-4)(-1)} }{ 2(-4) }$

21. poopsiedoodle Group Title

Ok, but what does the $\pm$ do? what's its significance?

22. hba Group Title

Well when we simplify it we would be taking the adding part on one side and subracting part on the other side.

23. poopsiedoodle Group Title

so it'd be 8+√blahblahblah --------------- 2-(-4)?

24. hba Group Title

Either, 8+√blahblahblah --------------- 2-(-4)? Or, 8-√blahblahblah --------------- 2-(-4)?

25. poopsiedoodle Group Title

so the $\pm$ just breaks up between the denominator and the numerator?

26. hba Group Title

Exactly.

27. poopsiedoodle Group Title

Ah. I guess I'll try another problem here and ask you if it's right or something.

28. hba Group Title

Sure :)

29. poopsiedoodle Group Title

$\huge 0=-2x ^{2} +14x +20$ $\large x=\frac{ -14\pm \sqrt{14^2 - 4(-2+20)} }{ -4 }$ $\large x= \frac{ -14+14-72 }{ -4 }$

30. poopsiedoodle Group Title

and the answer is $\huge \frac{ -7\pm \sqrt{89} }{ 2 }$. Would I be right?

31. hba Group Title

Its is -4(a)(c) not -4(a+c)

32. poopsiedoodle Group Title

oh. Well that ruins that then.

33. hba Group Title

Yes it does :) Do it on a paper and tell me what you got from that equation :)

34. poopsiedoodle Group Title

$\Large x=\frac{ -14\pm \sqrt{14^2 - 4(-2*20)} }{ -4 }$ $\Large x=\frac{ -14\pm 14 - 4(-40)} { -4 }$ $\Large x=\frac{ -14\pm 14-160} { -4}$ $\Large x=\frac{ -14\pm -146} {-4}$ set x to 0 and divide all by -2 to get $\Large \frac{ 7\pm 73} { 2}$

35. poopsiedoodle Group Title

and now I'm confused.

36. poopsiedoodle Group Title

oh wait, I forgot to keep the x's in there. Crap.

37. poopsiedoodle Group Title

Think you could help me out here? My mind is about to implode.

38. hba Group Title

x=7+73/2,x=7-73/2

39. hba Group Title

Btw, (-) *(-)=+

40. hba Group Title

So just because of signs it goes wrong.

41. hba Group Title

$\Large x=\frac{ -14\pm 14 - 4(-40)} { -4 }$ Continue from here.

42. poopsiedoodle Group Title

But I left the xs out of my work. ._.

43. hba Group Title

44. hba Group Title

Continue working from here.

45. poopsiedoodle Group Title

$\Large x=\frac{ -14\pm 14 - 4(-40)} { -4 }$ $\Large x=\frac{ -14\pm 14+160} {-4}$ $\Large x=\frac{ -14\pm 174} {-4}$ $\Large x=\frac {\frac{ -14\pm 174} {-4}} {-2}$ $\Large x=\frac {7\pm -87} {2}$

46. poopsiedoodle Group Title

And now what do I do?

47. hba Group Title

I don't know what you are upto ,where did that divide by -2 come in between ?

48. poopsiedoodle Group Title

Well, I'm not sure. I just thought I had to do that. I'm rather confused ._.

49. hba Group Title

Hmm,If OS would be working on chrome i would have worked one problem for you. Can we do this later ?

50. poopsiedoodle Group Title

I'm using chrome right now o_o But, I guess that'd be OK :P

51. hba Group Title

Thanks.

52. poopsiedoodle Group Title

Thanks to you too :3


text:
# Using binary or discrete data with phangorn

If data are not sequence alignment an phyDat object then there are generic functions as.phyDat() in phangorn to transform a matrices and data.frames into phyDat objects. For example you can read in your data with read.table() or read.csv(), but you might need to transpose your data. For matrices as.phyDat() assumes that the entries each row belongs to one individual (taxa), but for data.frame each column. For binary data you can transform these with a command like (depending how you coded them):

as.phyDat(data, type="USER", levels = c(0, 1))
as.phyDat(data, type="USER", levels = c(TRUE, FALSE))

Often you also have missing data (e.g. -) which you want to code as ambiguous character. In this case your code may look like:

as.phyDat(data, type="USER", levels = c("0", "1"), , ambiguity="-")

More information is avaiable in one of the vignettes (type vignette("phangorn-specials", package = "phangorn") in R).


text:
# Tag Info

0

I'm not sure that you fully understand what is meant by the term "API". You are describing items that you can create yourself with any basic API/data source, really. You'd have to have some programming knowledge, as would anyone that uses an API, but it doesn't sound like you want to get that deep into this.

0

You won't find any real time screener anywhere, because of the comission you need to pay to the stock market. But if you can manage to get the data flow, you can run a script in matlab or any other language every few time, so that it is almost real time.

2

I'm going to separate your question in two. The key thing you're asking is that how does Return.rebalancing treat your different frequencied and number of asset return and weight objects. Data munging: It subsets the first ncol(weight) columns of R (as ncol(edhec) > ncol(weights) ncol R is now 11. Checks if the first date in R is less than the first date ...

1

I found out that the upper time series is the result of a call > tail(Return.rebalancing(edhec,weights)) portfolio.returns 2009-03-31 0.005082048 2009-04-30 0.022982981 2009-05-31 0.037432398 2009-06-30 0.011107189 2009-07-31 0.025580507 2009-08-31 0.017983519 (by optical comparison. ;-) ) A glance ...

1

The GBM is a continuous model, so using large integer time steps naturally leaves large discretization error (which vanishes when you increase the number of steps). Use small time step 0.001: paths(j + 1,i) = paths(j,i) * exp((mu - vol^2/2)*0.001 + vol * 0.001^0.5*shocks_ant(j,i)); Then the mean is almost exactly 100 as expected.

0

appearantly your sampling variance is too large. I reimplemented your example in R. What I first saw is, that the mean got worse if I took more time steps (you take $300$). Your volatility is $0.3$ which is $30\%$ per year and you sample $300$ years. What you should do is the following: define a variable nbr_steps_peryear choose the number of years then ...

2

You should look at confidence interval. Normally, your confidence interval size is proportional to the standard deviation, looking something like: with probability $p$ your value will be in the interval: $$[\bar{S} - k*StdDev, \bar{S} + k*StdDev]$$ Then, getting back to your simulation, we can say that your time step is very big (1 year) and you simulate ...

0

You're confusing the language that you will use for your analysis with the language you will use to execute your results. The modern approach for APIs (for all industries/apps) is to use and HTTP based REST API that is exposed to the outside world, most likely with something like JSON. This approach works because it can be used by a large variety of ...

3

You have typo "vol^2", but it should be "vol". Its $$\sqrt{\sigma^2T}=\sigma\sqrt{T}$$

Top 50 recent answers are included


text:
## Crowdfund subtitling of interviews?

By

Four months ago, Leila Schneps started a crowd-funding project to translate part 3 of Scharlau’s biography of Grothendieck. So far, she raised 3350 of the required 6000 dollars from 45 donations.

## Fresh(wo)men’s course on Foundations

By

In two months I’ll be teaching ‘Logic and Set Theory’ for the first time, a first year, first semester course on Foundations. And no (though I considered it for a nanosecond) I will not trow HoTT at them…

## On categories, go and the book $\in$

By

A nice interview with Jacques Roubaud (the guy responsible for Bourbaki’s death announcement) in the courtyard of the ENS. He talks about go, categories, the composition of his book $\in$ and, of course, Grothendieck and Bourbaki.

## Why I didn’t post yesterday today

By

At times it is far more rewarding to enter into an exchange on G+ than to try to write yet another blog post here…

## A noncommutative moduli space

By

Supernatural numbers also appear in noncommutative geometry via James Glimm’s characterisation of a class of simple $C^*$-algebras, the UHF-algebras.

## The origins of HoTT

By

Below, a great G+-post by Allen Knutson, pointing to a talk given by Voevodsky in which he explains why  some errors (by himself and others) convinced him that mathematics needed a new foundation.

## Erna Bannow, octonions and the Leech?

By

Erna Bannow was born october 6th1911 in Schlawe (Pommern), now Sławno in Poland. In 1930 she finished her secondary studies at the Oberlyzeum Merseburg (near Leipzig). She then continued her studies at the universities of Marburg, Bonn, and Göttingen.

## Oulipo’s use of the Tohoku paper

By

Many identify the ‘Tohoku Mathematical Journal’ with just one paper published in it, affectionately called the Tohoku paper: “Sur quelques points d’algèbre homologique” by Alexander Grothendieck.

By

## Hilbert’s heartbreak hotel

By

A post by Nature is causing some ripples at Google+.