Repeated measurements of the same quantity in the same way can give different values. Words with double meaning: definition, examples of use Differences from homonyms

Let's analyze the current situation.

First, let's find out why different ways of measuring the same height led to different results.

At first glance, the first method is the most reliable. We apply a tape measure to the surface of the building and determine the required height. A closer analysis shows that this is not entirely true. It turns out that the building has a slight slope, and the wall in the place where the measurements are taken has a certain curvature - it is convex, and towards the street. This means that we were not measuring the height of the building, but the length of the wall associated with the height.

The second method is an indirect measurement. Having measured the time the ball fell, we calculate the height using the well-known formula for free fall: h = gt 2 /2. This time the measurement is really about height. But we forgot that the ball moves in the air and, therefore, experiences resistance from the environment. Therefore, the value calculated by the formula is also not the true value of the height of the building.

The third dimension, like the second, is indirect. The height is determined from geometric considerations: in a right triangle, the length of the opposite leg is equal to the product of the length of the adjacent leg and the tangent of the angle. In our case, height plays the role of one side, and the distance from the laser to the building plays the role of another. This time we were let down by the assumption of a perfectly horizontal surface on which the building stands. Result - again we measured a quantity that is not height, but now for a different reason.

So, in each method there are some constant factors(in each case their own, and there may be several of them), which lead to the appearance systematic error measurements using this method. Each time the value of the same quantity is measured under the same conditions, the systematic error has the same value. If these factors are taken into account by introducing appropriate corrections, then you can get closer to the real value of the measured quantity, and then the measurement results using different methods (taking into account corrections for systematic error) can turn out to be quite close. Thus, in principle, systematic errors can be taken into account and even excluded , although doing this in practice can be quite challenging.

Now let's try to find out why repeated measurements of the same height using the same method (including the same set of instruments) can lead to different values. This is related to a number of factors acting randomly. In the example considered, there may be small mechanical vibrations of the soil, building and devices, thermal effects associated with changes in the linear dimensions of the wall and the devices used, etc. Finally, there is also the human factor associated with the perception of ongoing processes and the reaction to this perception. As a result, repeated measurements of the same quantity may result in different values ​​due to random errors. From measurement to measurement, a random error can change both its sign and its magnitude. Due to the random nature of the impacts It is impossible to predict in advance the magnitude of such an error .



Our analysis raises logical questions:

1. What is the “true” value of the measured quantity?

2. How to present measurement results taking into account errors?

Since these questions relate not only to the example considered, but

and any other measurements, we will move on to generalizations and development of general recommendations.

The given specific example demonstrated a general property characteristic of any measurements - any measurement is accompanied by errors .

This property is ultimately due to the fact that any measurement presupposes a certain interconnected chain of participants in the measurement procedure: observer – measuring device – analyzed object – “external environment”.

The elements of this chain are connected by a huge number of interactions and movements. During the measurement process, the analyzed object, the measuring device and the observer can be subject to various influences (including mutual ones), which affects the measurement result.

Of course, if we reduce influences that are not directly related to the measurement procedure and try to take into account irreducible influences, then the accuracy of our measurements will increase. But absolutely accurate measurement is impossible in principle. And this is largely due to the nature of the measured quantities themselves.



If, for example, we want to absolutely accurately measure the length of a metal rod, we will discover the presence of fundamentally irreducible (albeit very small) vibrations of the crystal lattice. There is no absolutely exact “true” length of the rod. It constantly changes randomly, deviating in one direction or another from some most frequently occurring value. We can take this value as the “true” value of the length and subsequently operate with it when talking about the length of the rod, or using this value for any calculations, for example, to determine the volume of the rod.

This kind of situation is found in many other dimensions. The measured quantities themselves can change randomly, which is due, as mentioned above, to the physical nature of these quantities. Thus we are faced with the fundamental irreducibility of random factors . They can be minimized, but they cannot be completely eliminated. Hence, When presenting measurement results, we must provide information regarding our assessment of the “true” value of a quantity, taking into account random measurement errors (provided that the systematic error is excluded or taken into account in the form of an appropriate correction). It is clear that such information can be most fully presented based on the results of multiple measurements.

Not uncommon in Russian. Very often, the same word can be used to name and/or characterize completely different objects or phenomena. Such words have one basic meaning - original, literal, and one (or more) - figurative, figurative, metaphorical. The latter usually arises on the basis of some characteristic, similarity, or association.

Examples of ambiguous nouns

Among nouns you can find many examples of words with double meanings. Here are just a few of them:

Word Direct meaning Figurative meaning
Ticket A plane or train ticket, a theater or cinema ticket. Examination ticket.
Crest Tool for combing hair, comb. The crest of a wave or mountain.
Word Speech unit. Literary genre. For example, "The Tale of Igor's Campaign."
Hand Body part - right hand, left hand.
  • Position, position of a person - “He is my right hand.”
  • "Handwriting", manner of execution, a recognizable author's touch - "the hand of a great artist."
  • Physical strength is a “heavy hand.”
Brush The hand is the part of the body from the wrist to the fingertips. Tool for painting with paints.
Job Physical labor, effort, human occupation. The visible result of physical labor is “Good job!”
Sheet Leaf growing on a tree. A sheet of paper, notebook or landscape sheet.
Root Tree root. The part of a tree that is underground.
  • Mathematical root of a number. For example, the root of 4 is 2.
  • The cause of some phenomenon or event is the “root of evil”, “the root of problems”.
Duty A sum of money or material value promised by one person to another, the result of borrowing. Moral desire for something, moral duty.

This is not the entire list. It is probably simply impossible to compile everything, because there are almost as many words with double meanings in the Russian language as there are single-meaning ones.

Examples of ambiguous adjectives

Different objects can not only be named in one word, but also characterized. Here are some examples of such words:

Word Direct meaning Figurative meaning
Steel Made from steel. For example, a steel knife. Very strong, unshakable - “nerves of steel.”
Gold Made of gold - “gold earrings”, “gold necklace”. Very valuable, kind, with outstanding moral qualities - “golden man”, “golden child”, “golden heart”.
Heavy Requiring a large amount of physical effort - "hard work." About something that is difficult for others to tolerate - “a difficult person”, “a difficult character”.
White White - “white snow”, “white leaf”. A poem without rhyme is “blank verse.”
Black Black - “black eyes”, “black marker”. Angry, sarcastic, touching on sensitive topics in a rude manner - “black humor”, “black comedy”.

Again, the list is incomplete. In addition, the list of words with double meanings includes adjectives that simultaneously describe colors, smells and/or tastes: orange, raspberry, lemon, plum, and so on.

Examples of ambiguous verbs

Action words can also have more than one meaning:

Word Direct meaning Figurative meaning
sit down Sit on a chair, in an armchair, on a horse. Board the train (not literally sit on the roof of the train, but figuratively - take your place in it).
Get off/go You can get off the train, get off at the desired stop, or go to the store. "Go/go crazy."
Beat Strike. “The spring flows like a fountain,” “life flows in full swing.”
Cut Separate into pieces using a knife or other sharp blade. Cause an unpleasant sensation - “light hurts the eyes”, “sound hurts the ears”.

Most often, words with double meanings are native Russian words. Borrowed terms usually have one meaning.

Differences from homonyms

It is very important to distinguish words with double meanings from homonyms: different words that are spelled the same. Polysemantic words have a direct, basic meaning, and a transferred meaning according to some attribute. Homonyms have all independent meanings. “handle” (door) and “handle” (writing) are homonyms, since there is no connection between them. But the word “satellite” has many meanings - the celestial body was called “satellite” because it moves around the planet, like a human satellite.



vote usa (6)

Is there a compile way to detect/prevent duplicate values ​​in a C/C++ enum?

The trick is that there are several elements that are initialized with explicit values .

Background:

I inherited some C code, for example:

#define BASE1_VAL (5 ) #define BASE2_VAL (7 ) typedef enum ( MsgFoo1A = BASE1_VAL , // 5 MsgFoo1B , // 6 MsgFoo1C , // 7 MsgFoo1D , // 8 MsgFoo1E , // 9 MsgFoo2A = BASE2_VAL , // Uh oh !7 again... MsgFoo2B // Uh oh!8 again... ) FOO ;

The problem is that as the code grows, and as developers add more messages to the MsgFoo1x group, it eventually overflows BASE2_VAL .

This code will eventually be ported to C++, so if there is only a C++ solution (template magic?) that's fine - but a solution that works with both C and C++ is better.

There are several ways to check this compile time, but they may not always work for you. Start by inserting the token value "token" right before MsgFoo2A.

typedef enum ( MsgFoo1A = BASE1_VAL , MsgFoo1B , MsgFoo1C , MsgFoo1D , MsgFoo1E , MARKER_1_DONT_USE , /* Don't use this value, but leave it here. */ MsgFoo2A = BASE2_VAL , MsgFoo2B ) FOO ;

Now we need a way to ensure that MARKER_1_DONT_USE< BASE2_VAL во время компиляции. Есть два распространенных метода.

Negative Size Arrays

Error declaring an array with a negative size. It looks a little ugly, but it works.

extern int IGNORE_ENUM_CHECK [ MARKER_1_DONT_USE > BASE2_VAL ? - eleven ];

Almost every compiler ever written generates an error if MARKER_1_DONT_USE is greater than BASE_2_VAL. GCC spits out:

test. c : 16 : error : size of array ' IGNORE_ENUM_CHECK ' is negative

Static assertions

If your compiler supports C11, you can use _Static_assert. C11 support is not ubiquitous, but your compiler may support _Static_assert anyway, especially since the corresponding function in C++ is widely supported.

_Static_assert (MARKER_1_DONT_USE< BASE2_VAL , "Enum values overlap." );

GCC issues the following message:

test. c : 16 : 1 : error : static assertion failed : "Enum values ​​overlap." _Static_assert (MARKER_1_DONT_USE< BASE2_VAL , "Enum values overlap." ); ^

Another approach might be to use something like gccxml (or more conveniently pygccxml) to identify candidates for manual inspection.

I don't know anything about what will automatically check all enum members, but if you want to check that future changes to the initializers (or the macros they rely on) don't cause conflicts:

switch (0) ( case MsgFoo1A : break ; case MsgFoo1B : break ; case MsgFoo1C : break ; case MsgFoo1D : break ; case MsgFoo1E : break ; case MsgFoo2A : break ; case MsgFoo2B : break ; )

will result in a compiler error if any of the integral values ​​are reused, and most compilers will even tell you which value (numeric value) was the problem.

I don't believe there is a way to detect this with the language itself, given that there are conceivable cases where you want two enum values ​​to be the same. However, you can always make sure that all explicitly specified elements are at the top of the list:

typedef enum ( MsgFoo1A = BASE1_VAL , // 5 MsgFoo2A = BASE2_VAL , // 7 MsgFoo1B , // 8 MsgFoo1C , // 9 MsgFoo1D , // 10 MsgFoo1E , // 11 MsgFoo2B // 12 ) FOO ;

As long as the assigned values ​​are at the top, no collision occurs unless for some reason the macros expand to values ​​that are the same.

Typically this problem is overcome by providing a fixed number of bits for each MsgFooX group and ensuring that each group does not overflow it allocates a number of bits. The Number of Bits solution is good because it allows bit-by-bit testing to determine which message group something belongs to. But there is no built-in language feature for this, because there are legitimate cases for an enum having two of the same values:

typedef enum ( gray = 4 , //Gry should be the same gray = 4 , color = 5 , //Also makes sense in some cases couleur = 5 ) FOO ;

Although we don't have full reflection, you can solve this problem if you can restore the enum values.

This is stated somewhere:

enum E(A=0,B=0);

Elsewhere we build this mechanism:

template< typename S , S s0 , S ... s >struct first_not_same_as_rest : std :: true_type (); template< typename S , S s0 , S s1 , S ... s >struct first_not_same_as_rest : std :: integral_constant< bool , (s0 != s1 ) && first_not_same_as_rest < S , s0 , s ... >::value>(); template< typename S , S ... s >struct is_distinct : std :: true_type (); template< typename S , S s0 , S ... s >struct is_distinct : std :: integral_constant< bool , std :: is_distinct < S , s ...>:: value && first_not_same_as_rest< S , s0 , s ... >::value>();

Once you have this hardware (which requires C++11), we can do the following:

static_assert(is_distinct< E , A , B >::value "duplicate values ​​in E detected");

and at compile time we ensure that there are no two elements.

This requires O(n) recursion depth, and O(n^2) running time by the compiler at compile time, so for extremely large enums this can cause problems. AO(lg(n)) and O(n lg(n)) work with a much larger constant factor, can be done by sorting the list of elements first, but there is a lot more to it.

With the enum conversion code proposed for C++1y-C++17, this will be doable without repeating elements.

I didn't like any of the answers already posted here, but they gave me some ideas. The most important method is to use Ben Voight's answer on using the switch statement. If multiple cases in a switch have the same number, you will get a compilation error.

What's most useful to me, and perhaps the original poster, is that it doesn't require any C++ capabilities.

To clear things up I used aaronps answer: How can I avoid repeating myself when creating list C++ and dependent data structure?

First define it in some header somewhere:

#define DEFINE_ENUM_VALUE (name , value ) name = value , #define CHECK_ENUM_VALUE (name , value ) case name : #define DEFINE_ENUM (enum_name , enum_values ​​) \ typedef enum ( enum_values ​​(DEFINE_ENUM_VALUE ) ) enum_name ; #define CHECK_ENUM (enum_name , enum_values ​​) \ void enum_name ## _test (void) ( switch(0) ( enum_values(CHECK_ENUM_VALUE); ) )

Now when you need to have an enum:

#define COLOR_VALUES (GEN ) \ GEN (Red , 1 ) \ GEN (Green , 2 ) \ GEN (Blue , 2 )

Finally, these lines are needed for the actual enumeration:

DEFINE_ENUM (Color , COLOR_VALUES ) CHECK_ENUM (Color , COLOR_VALUES )

DEFINE_ENUM Creates an enum data type. CHECK_ENUM performs a testing function that includes all enumeration values. The compiler will crash when compiling CHECK_ENUM if you have duplicates.

From the very definition of a sign it is already clear that its main characteristic is its inherent representative function: to be a representative, or substitute, in a given language of some (specific) object. And this - meaning sign. The meaning of verbal signs can be objects in the broad sense of the word - everything that can somehow be highlighted and named, about which something is affirmed or denied. It should be noted that the meanings are, first of all, objects of extra-linguistic reality - natural and social. Another essential characteristic of a verbal sign is its meaning. Meaninglinguistic expression– this is the verbal formalized information associated with it, which allows you to distinguish the object it represents (or a set of objects of the same type) from other objects. For example, the meaning of the word “Moon” - in its usual use - may be such a characteristic as “a natural satellite of the Earth”; the meaning of the German sentence “DerSchneeistwei” in Russian is reproduced by the sentence “Snow is white”; the meaning of the word “theft” is “secret theft of someone else’s property,” etc.

Note that for the same object (or set of objects) different distinguishing characteristics are possible. This means that two different expressions can have different meanings but the same meaning, for example, “equiangular triangle” and “equilateral triangle.” Words (or phrases) with the same meaning are called equivalent.In addition, the same word can have several meanings and, therefore, express different concepts (meanings). This phenomenon is called polysemy. Polysemy of words is inappropriate in scientific and professional communication.

Meaning is the connecting link between a word and the object it denotes. Giving meaning to a linguistic expression is an important logical way of introducing new terms into a language and clarifying the meanings of words already present in it.

When we talk about meaning, we will mean straight the meaning of words and phrases, in contrast, for example, to indirect, figurative (“white gold”, “black gold”, “flies on the wings of love” and other metaphorical expressions that indicate only a certain similarity of some objects, processes, phenomena with others). The direct meaning must also be distinguished from the “literal”, or etymological meaning (“geography” literally means a description of the Earth, “lie” literally means “talk”, “talk”, etc.).

Regarding meaning and significance in logic, it is generally accepted that the meaning of a sign is a function of its meaning. This emphasizes the special role of meaning: it unambiguously points to the object denoted by the sign, mentally distinguishing it from many others.

It is clear that both society and each individual must have a certain stock of words that are correlated with their meanings without the mediation of meaning. Here we have the use of words as signs, the connection with the meanings of which is established in the process of pronouncing the word and simultaneous sensory perception of its meaning, for example, color (“red”), smell, spatial configuration of the designated object, etc.

Everyone knows the division of natural language expressions into parts of speech. In logical “grammar” there is a similar division, but on a different basis, namely, depending on the type of objects of thought represented by words (or phrases).

The first type of objects will include single items. We will consider as single objects such objects of cognition, each of which has an individual difference from objects of the same type: the number 7, the marriage of A.S. Pushkin, Moon, etc. The logical category of linguistic expressions corresponding to individual objects is single names. Their meaning is the information associated with them, which makes it possible to unambiguously distinguish this single object from many objects of the same type. Examples of such names: “Peter 1”, “Current President of the Russian Federation”, “Author of the novel “Eugene Onegin”, “Celebration of the 66th anniversary of Victory over Nazi Germany”, etc. Single names are divided into descriptive (complex) and on non-descriptive (simple) names. Examples of simple (non-descriptive) names are the words "Everest", "Y.A." Gagarin”, examples of complex (descriptive) names are “The first cosmonaut”, “The largest river in Europe”.

The second type of objects are the properties of objects and the relationships between them. We will call expressions that represent such objects in a language universals. Examples of universals: the word “table” in the statement “This table is round”; the word “brother” in the saying “Ivan is Peter’s brother”; the word “crime” in the statement “Theft is a crime.” A universal is characterized by the fact that it can perform a dual role in a sentence: 1) form part of a logical “predicate”, i.e. represent any property or relationship attributed to objects, as in the example “This table is round"; in this function we will call universals predicates; 2) be a logical “subject”, i.e. represent in a statement an arbitrarily taken object of a certain set of objects of the same type, each of which has a corresponding property, as in the example “Any crime dangerous to society." We will call such universals subjects.

The third type of objects are situations (state of affairs). The logical category of linguistic expressions corresponding to situations consists of narrative sentences. For example, the presence of a situation where the Volga flows into the Caspian Sea is reproduced in the sentence “The Volga flows into the Caspian Sea”, and a situation where the sum of the angles of a triangle is equal to 180° is reproduced in the sentence “The sum of the angles of a triangle is 2d”, etc. Situations can be simple or complex, depending on whether the sentences representing them are simple or complex. Examples of complex sentences and, accordingly, situations: “If a number is divisible by 6, then it is divisible by 2”; “Ian and his father were at home at the time.”

The meaning of a sentence is a proposition. The difference between a judgment and a sentence (as a sign form of a judgement) can be seen when we compare two sentences that are correct translations from one natural language to another: the sign structures are different, but their meaning is the same. The meaning of the sentence and there is a judgment. Since we are talking about the logical analysis of language, the meaning of a sentence is considered to be any one of the abstract objects true or lie. Thus, the statement “The Volga flows into the Caspian Sea” denotes truth (since this sentence reproduces a situation that takes place in reality), and the statement “The Volga flows into the Black Sea” is a lie (since it does not correspond to reality).

Each science has terms specific to it. You can talk about mathematical terms: “number”, “geometric figure”, “set”; there are physical terms such as “mass”, “elementary particle”, “electric charge”; in biology the terms “cell”, “organism”, “heredity” appear; in medicine – “symptom”, “syndrome”, “disease”; in jurisprudence – “legal norm”, “crime”, “theft”. These expressions make up the category descriptive terms(Latin description - description), behind each of which there is a specific object, some property or a set of objects of the same type, etc. In our analysis, descriptive terms are names and universals.

In the language of any science, in addition to descriptive terms characterizing the objects of its own subject area, expressions are used that are used in all sciences. These include some of the particles and conjunctions such as “and”, “or”, “if, then”, “it is not true that”, “then and only then”. With the help of these terms, complex (compound) statements are formed from simple statements (judgments). This same group of “interdisciplinary” terms includes the expressions “is” (“essence”), “all” (“everyone”), “some” (“exist”), “not”, with the help of which simple singular and plural ones are constructed ( general and particular) judgments. They constitute the category logical terms(logical constants).

Without logical terms, no judgment can be expressed. They determine their extremely general structure - logical form, logical relations and laws of logic are associated with them. Some of these terms are sometimes omitted for the sake of brevity, as in the statement “Man is mortal.” In the logical analysis of judgments, we are obliged to restore all these “gaps,” which allows us to clarify their logical content and resolve the question of their truth or falsity. In particular, the statement just given will take the following form: “All people are mortal.” And although after such reconstruction and completion these sentences sometimes become somewhat clumsy, the thoughts expressed by them acquire clarity and definiteness.

Similar articles

2023 liveps.ru. Homework and ready-made problems in chemistry and biology.