text:
## Volume 38 Issue 3

Online Date:

#### Current Issue

GENERAL
 Select Two-Dimensional Quantum Walk with Non-Hermitian Skin Effects Tianyu Li, Yong-Sheng Zhang, and Wei Yi Chin. Phys. Lett. 2021, 38 (3): 030301 .   DOI: 10.1088/0256-307X/38/3/030301 Abstract   PDF(pc) (2726KB) ( 181 ) PDF(mobile)(3019KB) ( 19 ) HTML ( 152 )  We construct a two-dimensional, discrete-time quantum walk, exhibiting non-Hermitian skin effects under open-boundary conditions. As a confirmation of the non-Hermitian bulk-boundary correspondence, we show that the emergence of topological edge states is consistent with the Floquet winding number, calculated using a non-Bloch band theory, invoking time-dependent generalized Brillouin zones. Further, the non-Bloch topological invariants associated with quasienergy bands are captured by a non-Hermitian local Chern marker in real space, defined via the local biorthogonal eigenwave functions of a non-unitary Floquet operator. Our work aims to stimulate further studies of non-Hermitian Floquet topological phases where skin effects play a key role.
 Select Effects of Quantum Noise on Quantum Approximate Optimization Algorithm Cheng Xue, Zhao-Yun Chen, Yu-Chun Wu, and Guo-Ping Guo Chin. Phys. Lett. 2021, 38 (3): 030302 .   DOI: 10.1088/0256-307X/38/3/030302 Abstract   PDF(pc) (780KB) ( 130 ) PDF(mobile)(832KB) ( 1 ) HTML ( 29 )  The quantum-classical hybrid algorithm is a promising algorithm with respect to demonstrating the quantum advantage in noisy-intermediate-scale quantum (NISQ) devices. When running such algorithms, effects due to quantum noise are inevitable. In our work, we consider a well-known hybrid algorithm, the quantum approximate optimization algorithm (QAOA). We study the effects on QAOA from typical quantum noise channels, and produce several numerical results. Our research indicates that the output state fidelity, i.e., the cost function obtained from QAOA, decreases exponentially with respect to the number of gates and noise strength. Moreover, we find that when noise is not serious, the optimized parameters will not deviate from their ideal values. Our result provides evidence for the effectiveness of hybrid algorithms running on NISQ devices.
 Select Experimental Protection of the Spin Coherence of a Molecular Qubit Exceeding a Millisecond Yingqiu Dai, Yue Fu, Zhifu Shi, Xi Qin, Shiwei Mu, Yang Wu, Ji-Hu Su, Yi-Fei Deng, Lei Qin, Yuan-Qi Zhai, Yan-Zhen Zheng, Xing Rong, and Jiangfeng Du Chin. Phys. Lett. 2021, 38 (3): 030303 .   DOI: 10.1088/0256-307X/38/3/030303 Abstract   PDF(pc) (1069KB) ( 839 ) PDF(mobile)(1470KB) ( 222 ) HTML ( 451 )  Molecular qubits are promising as they can benefit from tailoring and versatile design of chemistry. It is essential to reduce the decoherence of molecular qubits caused by their interactions with the environment. Herein the dynamical decoupling (DD) technique is utilized to combat such decoherence. The coherence time for a transition-metal complex {(PPh$_4$)}$_2$[Cu(mnt)$_2$] is prolonged from 6.8 µs to 1.4 ms. The ratio of the coherence time and the length of $\pi$/2 pulse, defined as the single qubit figure of merit ($Q_{\rm M}$), reaches $1.4 \times 10^5$, which is 40 times greater than what previously reported for this molecule. Our results show that molecular qubits, with milliseconds coherence time, are promising candidates for quantum information processing.
 Select Quantum Algorithm for Approximating Maximum Independent Sets Hongye Yu, Frank Wilczek, and Biao Wu Chin. Phys. Lett. 2021, 38 (3): 030304 .   DOI: 10.1088/0256-307X/38/3/030304 Abstract   PDF(pc) (1565KB) ( 626 ) PDF(mobile)(2438KB) ( 134 ) HTML ( 449 )  We present a quantum algorithm for approximating maximum independent sets of a graph based on quantum non-Abelian adiabatic mixing in the sub-Hilbert space of degenerate ground states, which generates quantum annealing in a secondary Hamiltonian. For both sparse and dense random graphs $G$, numerical simulation suggests that our algorithm on average finds an independent set of size close to the maximum size $\alpha(G)$ in low polynomial time. The best classical algorithms, by contrast, produce independent sets of size about half of $\alpha(G)$ in polynomial time.
 Select Advection and Thermal Diode Ying Li and Jiaxin Li Chin. Phys. Lett. 2021, 38 (3): 030501 .   DOI: 10.1088/0256-307X/38/3/030501 Abstract   PDF(pc) (1229KB) ( 214 ) PDF(mobile)(1228KB) ( 5 ) HTML ( 40 )  We prove that under the condition of closed boundary to mass flux, pure advection is not a valid mechanism to make a practical thermal diode. Among the various designs of thermal diodes, many of them involve circulating fluid flow, such as in thermosyphons. However, those designs often employ natural convection, which is basically a nonlinear process. It thus remains unclear how the pure advection of temperature field induced by a decoupled velocity field influences the symmetry of heat transfer. Here we study three typical models with pure advection: one with open boundary, one with closed boundary at unsteady state, and one with closed boundary at steady state. It is shown that only the last model is practical, while it cannot become a thermal diode. Finally, a general proof is given for our claim by analyzing the diffusive reciprocity.
 Select Ehrenfest Time at the Transition from Integrable Motion to Chaotic Motion Chuan Zhao and Biao Wu Chin. Phys. Lett. 2021, 38 (3): 030502 .   DOI: 10.1088/0256-307X/38/3/030502 Abstract   PDF(pc) (1346KB) ( 60 ) PDF(mobile)(1345KB) ( 4 ) HTML ( 41 )  Ehrenfest time depends differently on the Planck constant in integrable motion and chaotic motion. We study how its dependence on the Planck constant changes when there is a continuous transition from regular motion to chaotic motion. We find that the dependence is a weighted compromise between its two distinct dependences in regular and chaotic motions. The study is carried out with the system of periodically driven anharmonic oscillator. As the system is quite typical, the result may apply generally.
NUCLEAR PHYSICS
 Select Quantum Anti-Zeno Effect in Nuclear $\beta$ Decay Ming Ji  and Chang Xu Chin. Phys. Lett. 2021, 38 (3): 032301 .   DOI: 10.1088/0256-307X/38/3/032301 Abstract   PDF(pc) (630KB) ( 276 ) PDF(mobile)(624KB) ( 10 ) HTML ( 257 )  The acceleration of decay induced by frequency measurements, namely the quantum anti-Zeno effect (AZE), was first predicted by Kofman and Kurizki [Nature 405 (2000) 546 ]. The effect of the frequency measurements on nuclear $\beta$ decay rate is analyzed based on the time-dependent perturbation theory. We present a detailed calculation of the decay rates of $^{3}$H, $^{60}$Co ($\beta^{-}$ type), $^{22}$Na, $^{106}$Ag ($\beta^{+}$ type) and $^{18}$F, $^{57}$Co and $^{111}$Sn (EC type) under frequency measurements. It is found that the effects of frequency measurements on the decay rates of $\beta^{+}$ and $\beta^{-}$ cases are different from the case of EC, and the smaller the $\beta$ decay energy is, the more favorable it is to observe the AZE in experiment. Based on our analysis, it is suggested that possible experimental candidates should have a small decay energy and a reasonable half life (such as $^{3}$H) for observing the AZE in $\beta$ decay.
FUNDAMENTAL AREAS OF PHENOMENOLOGY(INCLUDING APPLICATIONS)
 Select Effective Interaction Force between an Electric Charge and a Magnetic Dipole and Locality (or Nonlocality) in Quantum Effects of the Aharonov–Bohm Type Gianfranco Spavieri, George T. Gillies, Miguel Rodriguez, and Maribel Perez Chin. Phys. Lett. 2021, 38 (3): 034101 .   DOI: 10.1088/0256-307X/38/3/034101 Abstract   PDF(pc) (443KB) ( 39 ) PDF(mobile)(428KB) ( 3 ) HTML ( 32 )  Classical electrodynamics foresees that the effective interaction force between a moving charge and a magnetic dipole is modified by the time-varying total momentum of the interaction fields. We derive the equations of motion of the particles from the total stress-energy tensor, assuming the validity of Maxwell's equations and the total momentum conservation law. Applications to the effects of Aharonov–Bohm type show that the observed phase shift may be due to the relative lag between interfering particles caused by the effective local force.
 Select Ultra-Broadband Infrared Metamaterial Absorber for Passive Radiative Cooling Yan-Ning Liu, Xiao-Long Weng, Peng Zhang, Wen-Xin Li, Yu Gong, Li Zhang, Tian-Cheng Han, Pei-Heng Zhou, and Long-Jiang Deng Chin. Phys. Lett. 2021, 38 (3): 034201 .   DOI: 10.1088/0256-307X/38/3/034201 Abstract   PDF(pc) (1643KB) ( 146 ) PDF(mobile)(1631KB) ( 3 ) HTML ( 64 )  Infrared metamaterial absorber (MMA) based on metal-insulator-metal (MIM) configuration with flexible design, perfect and selective absorption, has attracted much attention recently for passive radiative cooling applications. To cool objects passively, broadband infrared absorption (i.e. 8–14 µm) is desirable to emit thermal energy through atmosphere window. We present a novel MMA composed of multilayer MIM resonators periodically arranged on a PbTe/MgF$_{2}$ bilayer substrate. Verified by the rigorous coupled-wave analysis method, the proposed MMA shows a relative bandwidth of about 45% (from 8.3 to 13.1 µm with the absorption intensity over 0.8). The broadband absorption performs stably over a wide incident angle range (below 50$^{\circ}$) and predicts 12 K cooling below ambient temperature at nighttime. Compared with the previous passive radiative coolers, our design gets rid of the continuous metal substrate and provides an almost ideal transparency window (close to 100%) for millimeter waves over 1 mm. The structure is expected to have potential applications in thermal control of integrated devices, where millimeter wave signal compatibility is also required.
PHYSICS OF GASES, PLASMAS, AND ELECTRIC DISCHARGES
 Select Nonlinear Coupling of Reversed Shear Alfvén Eigenmode and Toroidal Alfvén Eigenmode during Current Ramp Shizhao Wei, Yahui Wang, Peiwan Shi, Wei Chen, Ningfei Chen, and Zhiyong Qiu Chin. Phys. Lett. 2021, 38 (3): 035201 .   DOI: 10.1088/0256-307X/38/3/035201 Abstract   PDF(pc) (545KB) ( 59 ) PDF(mobile)(533KB) ( 2 ) HTML ( 28 )  Two novel nonlinear mode coupling processes for reversed shear Alfvén eigenmode (RSAE) nonlinear saturation are proposed and investigated. In the first process, the RSAE nonlinearly couples to a co-propagating toroidal Alfvén eigenmode (TAE) with the same toroidal and poloidal mode numbers, and generates a geodesic acoustic mode. In the second process, the RSAE couples to a counter-propagating TAE and generates an ion acoustic wave quasi-mode. The condition for the two processes to occur is favored during current ramp. Both the processes contribute to effectively saturate the Alfvénic instabilities, as well as nonlinearly transfer of energy from energetic fusion alpha particles to fuel ions in burning plasmas.
 Select Energetic Particle Physics on the HL-2A Tokamak: A Review Pei-Wan Shi, Wei Chen, and Xu-Ru Duan Chin. Phys. Lett. 2021, 38 (3): 035202 .   DOI: 10.1088/0256-307X/38/3/035202 Abstract   PDF(pc) (4313KB) ( 79 ) PDF(mobile)(4300KB) ( 1 ) HTML ( 39 )  Interaction between shear Alfvén wave (SAW) and energetic particles (EPs) is one of major concerns in magnetically confined plasmas since it may lead to excitation of toroidal symmetry breaking collective instabilities, thus enhances loss of EPs and degrades plasma confinement. In the last few years, Alfvénic zoology has been constructed on HL-2A tokamak and series of EPs driven instabilities, such as toroidal Alfvén eigenmodes (TAEs), revered shear Alfvén eigenmodes (RSAEs), beta induced Alfvén eigenmodes (BAEs), Alfvénic ion temperature gradient (AITG) modes and fishbone modes, have been observed and investigated. Those Alfvénic fluctuations show frequency chirping behaviors through nonlinear wave-particle route, and contribute to generation of axisymmetric modes by nonlinear wave-wave resonance in the presence of strong tearing modes. It is proved that the plasma confinement is affected by Alfvénic activities from multiple aspects. The RSAEs resonate with thermal ions, and this results in an energy diffusive transport process while the nonlinear mode coupling between core-localized TAEs and tearing modes trigger avalanche electron heat transport events. Effective measures have been taken to control SAW fluctuations and the fishbone activities are suppressed by electron cyclotron resonance heating. Those experimental results will not only contribute to better understandings of energetic particles physics, but also provide technology bases for active control of Alfvénic modes on International Thermonuclear Experimental Reactor (ITER) and Chinese Fusion Engineering Testing Reactor (CFETR).
CONDENSED MATTER: STRUCTURE, MECHANICAL AND THERMAL PROPERTIES
 Select Novel Superconducting Electrides in Ca–S System under High Pressures Yun-Xian Liu , Chao Wang, Shuai Han , Xin Chen , Hai-Rui Sun , and Xiao-Bing Liu Chin. Phys. Lett. 2021, 38 (3): 036201 .   DOI: 10.1088/0256-307X/38/3/036201 Abstract   PDF(pc) (3883KB) ( 119 ) PDF(mobile)(4095KB) ( 11 ) HTML ( 28 )  Due to their unique structure properties, most of the electrides that possess extra electrons locating in interstitial regions as anions are insulators. Metallic and superconducting electrides are very rare under ambient conditions. We systematically search possible compounds in Ca–S systems stabilized under various pressures up to 200 GPa, and investigate their crystal structures and properties using first-principles calculations. We predict a series of novel stoichiometries in Ca–S systems as potential superconductors, including $P2_{1}/m$ Ca$_{3}$S, $P$4mbm Ca$_{3}$S, Pnma Ca$_{2}$S, Cmcm Ca$_{2}$S, Fddd CaS$_{2}$, Immm CaS$_{3}$ and $C2/c$ CaS$_{4}$. The $P4mbm$ Ca$_{3}$S phase exhibits a maximum $T_{\rm c}$ value of $\sim$20 K. It is interesting to notice that the $P2_{1}/m$ Ca$_{3}$S and Pnma Ca$_{2}$S stabilized at 60 and 50 GPa behave as superconducting electrides with critical temperatures $T_{\rm c}$ of 7.04 K and 0.26 K, respectively. More importantly, our results demonstrate that $P2_{1}/m$ Ca$_{3}$S and Pnma Ca$_{2}$S are dynamically stable at 5 GPa and 0 GPa, respectively, indicating a high possibility to be quenched to ambient condition or synthesized using the large volume press.
 Select Quantum Transport across Amorphous-Crystalline Interfaces in Tunnel Oxide Passivated Contact Solar Cells: Direct versus Defect-Assisted Tunneling Feng Li, Weiyuan Duan, Manuel Pomaska, Malte Köhler, Kaining Ding, Yong Pu, Urs Aeberhard, and Uwe Rau Chin. Phys. Lett. 2021, 38 (3): 036301 .   DOI: 10.1088/0256-307X/38/3/036301 Abstract   PDF(pc) (2400KB) ( 184 ) PDF(mobile)(2696KB) ( 2 ) HTML ( 38 )  Tunnel oxide passivated contact solar cells have evolved into one of the most promising silicon solar cell concepts of the past decade, achieving a record efficiency of 25%. We study the transport mechanisms of realistic tunnel oxide structures, as encountered in tunnel oxide passivating contact (TOPCon) solar cells. Tunneling transport is affected by various factors, including oxide layer thickness, hydrogen passivation, and oxygen vacancies. When the thickness of the tunnel oxide layer increases, a faster decline of conductivity is obtained computationally than that observed experimentally. Direct tunneling seems not to explain the transport characteristics of tunnel oxide contacts. Indeed, it can be shown that recombination of multiple oxygen defects in $a$-SiO$_{x}$ can generate atomic silicon nanowires in the tunnel layer. Accordingly, new and energetically favorable transmission channels are generated, which dramatically increase the total current, and could provide an explanation for our experimental results. Our work proves that hydrogenated silicon oxide (SiO$_{x}$:H) facilitates high-quality passivation, and features good electrical conductivity, making it a promising hydrogenation material for TOPCon solar cells. By carefully selecting the experimental conditions for tuning the SiO$_{x}$:H layer, we anticipate the simultaneous achievement of high open-circuit voltage and low contact resistance.
CONDENSED MATTER: ELECTRONIC STRUCTURE, ELECTRICAL, MAGNETIC, AND OPTICAL PROPERTIES
 Select Superconductivity and Charge Density Wave in Iodine-Doped CuIr$_{2}$Te$_{4}$ Mebrouka Boubeche, Jia Yu, Li Chushan, Wang Huichao, Lingyong Zeng, Yiyi He, Xiaopeng Wang, Wanzhen Su, Meng Wang, Dao-Xin Yao, Zhijun Wang, and Huixia Luo Chin. Phys. Lett. 2021, 38 (3): 037401 .   DOI: 10.1088/0256-307X/38/3/037401 Abstract   PDF(pc) (3726KB) ( 160 ) PDF(mobile)(3724KB) ( 4 ) HTML ( 50 )  We report a systematic investigation on the evolution of the structural and physical properties, including the charge density wave (CDW) and superconductivity of the polycrystalline CuIr$_{2}$Te$_{4- x}$I$_{x}$ for $0.0 \le x \le 1.0$. X-ray diffraction results indicate that both of $a$ and $c$ lattice parameters increase linearly when $0.0 \le x \le 1.0$. The resistivity measurements indicate that the CDW is destabilized with slight $x$ but reappears at $x \ge 0.9$ with very high $T_{\rm CDW}$. Meanwhile, the superconducting transition temperature $T_{\rm c}$ enhances as $x$ increases and reaches a maximum value of around 2.95 K for the optimal composition CuIr$_{2}$Te$_{1.9}$I$_{0.1}$ followed by a slight decrease with higher iodine doping content. The specific heat jump ($\Delta C/\gamma T_{\rm c}$) for the optimal composition CuIr$_{2}$Te$_{3.9}$I$_{0.1}$ is approximately 1.46, which is close to the Bardeen–Cooper–Schrieffer value of 1.43, indicating that it is a bulk superconductor. The results of thermodynamic heat capacity measurements under different magnetic fields [$C_{\rm p}(T, H)$], magnetization $M(T, H)$ and magneto-transport $\rho (T, H)$ measurements further suggest that CuIr$_{2}$Te$_{4- x}$I$_{x}$ bulks are type-II superconductors. Finally, an electronic phase diagram for this CuIr$_{2}$Te$_{4- x}$I$_{x}$ system has been constructed. The present study provides a suitable material platform for further investigation of the interplay of the CDW and superconductivity.
 Select Gate Tunable Supercurrent in Josephson Junctions Based on Bi$_{2}$Te$_{3}$ Topological Insulator Thin Films Wei-Xiong Wu, Yang Feng, Yun-He Bai, Yu-Ying Jiang, Zong-Wei Gao, Yuan-Zhao Li, Jian-Li Luan, Heng-An Zhou, Wan-Jun Jiang, Xiao Feng, Jin-Song Zhang, Hao Zhang, Ke He, Xu-Cun Ma, Qi-Kun Xue, and Ya-Yu Wang Chin. Phys. Lett. 2021, 38 (3): 037402 .   DOI: 10.1088/0256-307X/38/3/037402 Abstract   PDF(pc) (1369KB) ( 251 ) PDF(mobile)(1360KB) ( 30 ) HTML ( 229 )  We report transport measurements on Josephson junctions consisting of Bi$_{2}$Te$_{3}$ topological insulator (TI) thin films contacted by superconducting Nb electrodes. For a device with junction length $L = 134$ nm, the critical supercurrent $I_{\rm c}$ can be modulated by an electrical gate which tunes the carrier type and density of the TI film. $I_{\rm c}$ can reach a minimum when the TI is near the charge neutrality regime with the Fermi energy lying close to the Dirac point of the surface state. In the p-type regime the Josephson current can be well described by a short ballistic junction model. In the n-type regime the junction is ballistic at 0.7 K $< T < 3.8$ K while for $T < 0.7$ K the diffusive bulk modes emerge and contribute a larger $I_{\rm c}$ than the ballistic model. We attribute the lack of diffusive bulk modes in the p-type regime to the formation of p–n junctions. Our work provides new clues for search of Majorana zero mode in TI-based superconducting devices.
 Select Superconductivity and Normal-State Properties of Kagome Metal RbV$_{3}$Sb$_{5}$ Single Crystals Qiangwei Yin, Zhijun Tu, Chunsheng Gong, Yang Fu , Shaohua Yan , and Hechang Lei Chin. Phys. Lett. 2021, 38 (3): 037403 .   DOI: 10.1088/0256-307X/38/3/037403 Abstract   PDF(pc) (848KB) ( 596 ) PDF(mobile)(819KB) ( 21 ) HTML ( 378 )  We report the discovery of superconductivity and detailed normal-state physical properties of RbV$_{3}$Sb$_{5}$ single crystals with V kagome lattice. RbV$_{3}$Sb$_{5}$ single crystals show a superconducting transition at $T_{\rm c}\sim 0.92$ K. Meanwhile, resistivity, magnetization and heat capacity measurements indicate that it exhibits anomalies of properties at $T^{*}\sim 102$–103 K, possibly related to the formation of charge ordering state. When $T$ is lower than $T^{*}$, the Hall coefficient $R_{\rm H}$ undergoes a drastic change and sign reversal from negative to positive, which can be partially explained by the enhanced mobility of hole-type carriers. In addition, the results of quantum oscillations show that there are some very small Fermi surfaces with low effective mass, consistent with the existence of multiple highly dispersive Dirac band near the Fermi energy level.
 Select Exotic Dielectric Behaviors Induced by Pseudo-Spin Texture in Magnetic Twisted Bilayer Yu-Hao Shen, Wen-Yi Tong, He Hu, Jun-Ding Zheng, and Chun-Gang Duan Chin. Phys. Lett. 2021, 38 (3): 037501 .   DOI: 10.1088/0256-307X/38/3/037501 Abstract   PDF(pc) (1336KB) ( 581 ) PDF(mobile)(1333KB) ( 70 ) HTML ( 394 )  Twisted van der Waals bilayers provide an ideal platform to study the electron correlation in solids. Of particular interest is the 30$^{\circ}$ twisted bilayer honeycomb lattice system, which possesses an incommensurate moiré pattern, and uncommon electronic behaviors may appear due to the absence of phase coherence. Such a system is extremely sensitive to further twist and many intriguing phenomena will occur. Based on first-principles calculations we show that, for further twist near 30$^{\circ}$, there could induce dramatically different dielectric behaviors of electron between left and right-twisted cases. Specifically, it is found that the left and right twists show suppressed and amplified dielectric response under vertical electric field, respectively. Further analysis demonstrate that such an exotic dielectric property can be attributed to the stacking dependent charge redistribution due to twist, which forms twist-dependent pseudospin textures. We will show that such pseudospin textures are robust under small electric field. As a result, for the right-twisted case, there is almost no electric dipole formation exceeding the monolayer thickness when the electric field is applied. Whereas for the left case, the system could even demonstrate negative susceptibility, i.e., the induced polarization is opposite to the applied field, which is very rare in the nature. Such findings not only enrich our understanding on moiré systems but also open an appealing route toward functional 2D materials design for electronic, optical and even energy storage devices.
 Select Observation of Ferroelastic and Ferroelectric Domains in AgNbO$_{3}$ Single Crystal Wei Zhao, Zhengqian Fu, Jianming Deng, Song Li, Yifeng Han, Man-Rong Li, Xueyun Wang, and Jiawang Hong Chin. Phys. Lett. 2021, 38 (3): 037701 .   DOI: 10.1088/0256-307X/38/3/037701 Abstract   PDF(pc) (2039KB) ( 5887 ) PDF(mobile)(2022KB) ( 28 ) HTML ( 267 )  Compared to AgNbO$_{3}$ based ceramics, the experimental investigations on the single crystalline AgNbO$_{3}$, especially the ground state and ferroic domain structures, are not on the same level. Here, based on successfully synthesized AgNbO$_{3}$ single crystal using a flux method, we observed the coexistence of ferroelastic and ferroelectric domain structures by a combination study of polarized light microscopy and piezoresponse force microscopy. This finding may provide a new aspect for studying AgNbO$_{3}$. The result also suggests a weak electromechanical response from the ferroelectric phase of AgNbO$_{3}$, which is also supported by the transmission electron microscope characterization. Our results reveal that the AgNbO$_{3}$ single crystal is in a polar ferroelectric phase at room temperature, clarifying its ground state which is controversial from the AgNbO$_{3}$ ceramic materials.
CROSS-DISCIPLINARY PHYSICS AND RELATED AREAS OF SCIENCE AND TECHNOLOGY
 Select Phase Stability and Hydroxyl Vibration of Brucite Mg(OH)$_{2}$ at High Pressure and High Temperature Wei-Bin Gui , Chao-Shuai Zhao , and Jin Liu Chin. Phys. Lett. 2021, 38 (3): 038101 .   DOI: 10.1088/0256-307X/38/3/038101 Abstract   PDF(pc) (729KB) ( 89 ) PDF(mobile)(721KB) ( 2 ) HTML ( 49 )  Brucite Mg(OH)$_{2}$ is an archetypal hydrous mineral and it has attracted a great deal of attention. However, little is known about the evolution of hydroxyl groups in brucite with respect to subduction fluids. We carried out Raman measurements up to 15.4 GPa and 874 K via an externally heated diamond anvil cell, investigating the stability of brucite under the conditions relevant to subducting slabs. The hydroxyl vibration mode $A_{\rm{1_g}}$(I) of brucite is weakened under simultaneous high pressure-temperature conditions. Meanwhile, the presence of carbonated solution can destabilize the hydroxyl groups of brucite at low pressure. Our results suggest that brucite releases water when reacting with hydrogen carbonate ion to form magnesite MgCO$_{3}$ in subduction zones. This implies that the global water cycle is largely coupled with the deep carbon cycle in Earth's interior.
 Select Au Films Composed of Nanoparticles Fabricated on Liquid Surfaces for SERS Xunheng Ye , Jiawei Shen , Xiangming Tao , Gaoxiang Ye , and Bo Yang Chin. Phys. Lett. 2021, 38 (3): 038102 .   DOI: 10.1088/0256-307X/38/3/038102 Abstract   PDF(pc) (1010KB) ( 49 ) PDF(mobile)(1004KB) ( 2 ) HTML ( 28 )  A series of Au films with different nominal deposition thickness $d$ were fabricated on ionic liquid surfaces by thermal evaporation at room temperature, taken as surface-enhanced Raman scattering (SERS) substrates. Au atoms deposited on the liquid surfaces can diffuse and aggregate randomly and eventually form films with ramified structure, which consist of nanoparticles (NPs). There are amounts of ultrasmall ($\sim$1 nm or smaller) nanogaps among the Au NPs, which can dramatically enhance Raman signal. Raman spectra of R6G were investigated with the assistance of the Au films. The results indicate that the Au films with higher thickness possess better SERS performance when $5.0 \le d \le 30.0$ nm. A random distribution model of Au NPs was used in the finite-difference time-domain method and the simulation results are in good agreement with the experimental findings.
 Select A Linear Frequency Principle Model to Understand the Absence of Overfitting in Neural Networks Yaoyu Zhang, Tao Luo, Zheng Ma, and Zhi-Qin John Xu Chin. Phys. Lett. 2021, 38 (3): 038701 .   DOI: 10.1088/0256-307X/38/3/038701 Abstract   PDF(pc) (924KB) ( 64 ) PDF(mobile)(922KB) ( 1 ) HTML ( 42 )  Why heavily parameterized neural networks (NNs) do not overfit the data is an important long standing open question. We propose a phenomenological model of the NN training to explain this non-overfitting puzzle. Our linear frequency principle (LFP) model accounts for a key dynamical feature of NNs: they learn low frequencies first, irrespective of microscopic details. Theory based on our LFP model shows that low frequency dominance of target functions is the key condition for the non-overfitting of NNs and is verified by experiments. Furthermore, through an ideal two-layer NN, we unravel how detailed microscopic NN training dynamics statistically gives rise to an LFP model with quantitative prediction power.
GEOPHYSICS, ASTRONOMY, AND ASTROPHYSICS
 Select Klein–Nishina Effect and the Cosmic Ray Electron Spectrum Kun Fang, Xiao-Jun Bi, Su-Jie Lin, and Qiang Yuan Chin. Phys. Lett. 2021, 38 (3): 039801 .   DOI: 10.1088/0256-307X/38/3/039801 Abstract   PDF(pc) (560KB) ( 262 ) PDF(mobile)(555KB) ( 12 ) HTML ( 282 )  Radiative energy losses are very important in regulating the cosmic ray electron and/or positron (CRE) spectrum during their propagation in the Milky Way. Particularly, the Klein–Nishina (KN) effect of the inverse Compton scattering (ICS) results in less efficient energy losses of high-energy electrons, which is expected to leave imprints on the propagated electron spectrum. It has been proposed that the hardening of CRE spectra around 50 GeV observed by Fermi-LAT, AMS-02, and DAMPE could be due to the KN effect. We show in this work that the transition from the Thomson regime to the KN regime of the ICS is actually quite smooth compared with the approximate treatment adopted in some previous works. As a result, the observed spectral hardening of CREs cannot be explained by the KN effect. It means that an additional hardening of the primary electrons spectrum is needed. We also provide a parameterized form for the accurate calculation of the ICS energy-loss rate in a wide energy range.


text:
# Self-reciprocal functions, powers of the Riemann zeta function and modular-type transformations

```@article{Dixit2013SelfreciprocalFP,
title={Self-reciprocal functions, powers of the Riemann zeta function and modular-type transformations},
author={Atul Dixit and Victor H. Moll},
journal={Journal of Number Theory},
year={2013},
volume={147},
pages={211-249}
}```
• Published 2013
• Mathematics, Physics
• Journal of Number Theory
Abstract Integrals containing the first power of the Riemann Ξ-function as part of the integrand that lead to modular-type transformations have been previously studied by Ramanujan, Hardy, Koshlyakov, Ferrar and others. An integral containing the square of the Riemann Ξ-function and involving an extra parameter z, whose type naturally extends that of the afore-mentioned integrals, was studied by Ramanujan. This integral implicitly involves squaring of the functional equation of ζ ( s ) . A… Expand
Zeros of combinations of the Riemann \$\Xi\$-function and the confluent hypergeometric function on bounded vertical shifts
• Mathematics
• 2017
In 1914, Hardy proved that infinitely many non-trivial zeros of the Riemann zeta function lie on the critical line using the transformation formula of the Jacobi theta function. Recently the firstExpand
Twisted second moments and explicit formulae of the Riemann zeta-function
Several aspects connecting analytic number theory and the Riemann zeta-function are studied and expanded. These include: 1. explicit formulae relating the Mobius function to the non-trivial zeros ofExpand
Koshliakov zeta functions I: Modular Relations
• A. Dixit, Rajat Gupta
• Mathematics, Physics
• 2021
Abstract. We examine an unstudied manuscript of N. S. Koshliakov over 150 pages long and containing the theory of two interesting generalizations ζp(s) and ηp(s) of the Riemann zeta function ζ(s),Expand
Koshliakov kernel and identities involving the Riemann zeta function
• Mathematics
• 2015
Some integral identities involving the Riemann zeta function and functions reciprocal in a kernel involving the Bessel functions \$J_{z}(x), Y_{z}(x)\$ and \$K_{z}(x)\$ are studied. Interesting specialExpand
On squares of odd zeta values and analogues of Eisenstein series
• Computer Science, Mathematics
• 2019
A Ramanujan-type formula involving the squares of odd zeta values is obtained by studying a more general analogue of the Eisenstein series, consisting of one more parameter N . Expand
Error functions, Mordell integrals and an integral analogue of partial theta function
• Mathematics
• 2016
A new transformation involving the error function \$\textup{erf}(z)\$, the imaginary error function \$\textup{erfi}(z)\$, and an integral analogue of a partial theta function is given along with itsExpand
Modular-type transformations and integrals involving the Riemann ?-function
A survey of various developments in the area of modular-type transformations (along with their generalizations of different types) and integrals involving the Riemann Ξ-function associated to them isExpand
A RAMANUJAN-TYPE FORMULA FOR ζ2(2m+ 1) AND ITS GENERALIZATIONS
A Ramanujan-type formula involving the squares of odd zeta values is obtained. The crucial part in obtaining such a result is to conceive the correct analogue of the Eisenstein series involved inExpand
A generalized modified Bessel function and a higher level analogue of the theta transformation formula
• Mathematics
• 2017
A new generalization of the modified Bessel function of the second kind \$K_{z}(x)\$ is studied. Elegant series and integral representations, a differential-difference equation and asymptoticExpand
On special Riemann xi function formulae of Hardy involving the digamma function
We consider some properties of integrals considered by Hardy and Koshliakov, and which have also been further extended recently by Dixit. We establish a new general integral formula from someExpand

#### References

SHOWING 1-10 OF 40 REFERENCES
Analogues of the general theta transformation formula
• A. Dixit
• Mathematics
• Proceedings of the Royal Society of Edinburgh: Section A Mathematics
• 2013
A new class of integrals involving the confluent hypergeometric function 1F1(a;c;z) and the Riemann Ξ-function is considered. It generalizes a class containing some integrals of Ramanujan, Hardy andExpand
Series transformations and integrals involving the Riemann Ξ-function
The transformation formulas of Ramanujan, Hardy, Koshliakov and Ferrar are unified, in the sense that all these formulas come from the same source, namely, a general formula involving an integral ofExpand
The Theory of the Riemann Zeta-Function
• Mathematics
• 1987
The Riemann zeta-function embodies both additive and multiplicative structures in a single function, making it our most important tool in the study of prime numbers. This volume studies all aspectsExpand
Transformation formulas associated with integrals involving the Riemann Ξ-function
Using residue calculus and the theory of Mellin transforms, we evaluate integrals of a certain type involving the Riemann Ξ-function, which give transformation formulas of the form F(z, α) = F(z, β),Expand
A transformation formula involving the gamma and riemann zeta functions in Ramanujan's lost notebook
• Mathematics
• 2010
Two proofs are given for a series transformation formula involving the logarithmic derivative of the Gamma function found in Ramanujan’s lost notebook. The transformation formula is connected with aExpand
Analogues of a transformation formula of Ramanujan
We derive two new analogues of a transformation formula of Ramanujan involving the Gamma and Riemann zeta functions present in the Lost Notebook. Both involve infinite series consisting of HurwitzExpand
Asymptotics and Mellin-Barnes Integrals
• Mathematics
• 2001
Asymptotics and Mellin-Barnes Integrals provides an account of the use and properties of a type of complex integral representation that arises frequently in the study of special functions typicallyExpand
SOME FORMULAS OF RAMANUJAN INVOLVING BESSEL FUNCTIONS
— We generalize a number of summation formulas involving the K-Bessel function, due to Ramanujan, Koshliakov, and others. Résumé. — Nous généralisons des formules sommatoires faisant intervenir lesExpand
Table of Integrals, Series, and Products
• Mathematics, Engineering
• 1943
Introduction. Elementary Functions. Indefinite Integrals of Elementary Functions. Definite Integrals of Elementary Functions. Indefinite Integrals of Special Functions. Definite Integrals of SpecialExpand
RAMANUJAN’S INGENIOUS METHOD FOR GENERATING MODULAR-TYPE TRANSFORMATION FORMULAS
We discuss an ingenious method of Ramanujan for generating modulartype transformations of the form F (α) = F (β), αβ = 1, having its origins in one of his published papers and in his Lost Notebook.Expand

format: plain


text:
#### Archived

This topic is now archived and is closed to further replies.

# Help with template function parameters

This topic is 5566 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I cannot figure out why the code at the end of this source listing does not compile when I call it with a literal. Can anyone help? And if so, could we please proceed from the premise that null knows what he is doing so that we can actually give definitive answers to the problem he is asking about? Much obliged; no grudges.

# include <new>
# include <stdexcept>

using std::logic_error;

// construct - invokes constructor, optionally passes arguments

template <typename T>
{ return new (address) T; }

template <typename T, typename P1>
inline T* construct (void* address, P1& p1)
{ return new (address) T (p1); }

template <typename T, typename P1, typename P2>
inline T* construct (void* address, P1& p1, P2& p2)
{ return new (address) T (p1, p2); }

// destruct - invokes destructor

template <typename T>
inline void* destruct (T* object)
{ delete object; return object; }

// reconstruct - invokes destructor and then constructor in-place

template <typename T>
inline T* reconstruct (T* object)
{ return construct (destruct (object)); }

template <typename T, typename P1>
inline T* reconstruct (T* object, P1& p1)
{ return construct (destruct (object), p1); }

template <typename T, typename P1, typename P2>
inline T* reconstruct (T* object, P1& p1, P2& p2)
{ return construct (destruct (object), p1, p2); }

// dynamic - a class that adds dynamic construction to its T

template <typename T> class dynamic
{
char memory [sizeof (T)]; // TODO: fix memory alignment issues

T*   object;              // TODO: implement copying

void verify () { if (not object) throw logic_error (""); }
void verify_null () { if (object) throw logic_error (""); }

public:
dynamic () : object (0) {}
~dynamic ()              { if (object) ::destruct (object); }

T* operator -> () { verify (); return  object; }
T& operator  * () { verify (); return *object; }

// construct

void construct ()
{ verify_null (); object = ::construct <T> (memory); }

template <typename P1>
void construct (P1& p1)
{ verify_null (); object = ::construct <T> (memory, p1); }

template <typename P1, typename P2>
void construct (P1& p1, P2& p2)
{ verify_null (); object = ::construct <T> (memory, p1, p2); }

// destruct

void destruct ()
{ verify (); ::destruct (object); object = 0; }

// reconstruct

void reconstruct ()
{ destruct (); construct (); }

template <typename P1>
void reconstruct (P1& p1)
{ destruct (); construct (p1); }

template <typename P1, typename P2>
void reconstruct (P1& p1, P2& p2)
{ destruct (); construct (p1, p2); }
};

// example code illustrating problem

struct myclass { myclass (int n) {} };

const int five = 5;

int main ()
{
dynamic <myclass> dm;

dm.construct (five);
//dm.construct (5) // <- this one wouldn''t work!!

}

##### Share on other sites
Well, at a first glance i would say it was because you are expecting non-const references to your construct() member functions. But then again "five" is const, and therefore shouldn't work either. Whats the error message?

quote:

And if so, could we please proceed from the premise that null knows what he is doing so that we can actually give definitive answers to the problem he is asking about? Much obliged; no grudges.

Wow, attitude problem.

Ok, i put your code into my compiler, and changed all references going into construct() members and global functions const. It compiled fine when using a literal.

[edited by - sark on September 11, 2002 8:21:28 PM]

##### Share on other sites
quote:
Original post by sark
Well, at a first glance i would say it was because you are expecting non-const references to your construct() member functions.

Passing a const value to a function expecting a non-const value is never a problem. Doing the inverse is.

I would suspect type ambiguity - is "5" a char, a float, an int, a double...? That''s why five works (it has a known type), but the literal doesn''t (it''s type cannot unambiguously be inferred). Try placing a type cast before it:
dm.construct((int)5);

##### Share on other sites
It won''t work for 5 for the same reason this doesn''t compile:
const int &i = &5;

Try changing construct to use value semantics (lose the references).

Also, gcc fails to compile it even for the const int five;

The :: scope operator fails to make it use the global functions, and it attempts to use one of the construct template methods.

Placing the global construct functions in a namespace, and referring to that explicit name space inside the dynamic class resolved this. I''m inclined to think that''s a bug in gcc 2.95.3

##### Share on other sites
quote:
Passing a const value to a function expecting a non-const value is never a problem. Doing the inverse is.

This is true for values, in both directions (copy constructors and assignment operators take const references; const references can be bound to both const and non-const objects), but in this case references are being created, and it''s not true for references.

Thus, whilst one can say:

  const int i = 0;int j = i;const int k = j;

without issue, one cannot say:

  const int i = 0;int& j = i;

although

  int j = 0;const int& k = j;

is fine.

quote:
I would suspect type ambiguity - is "5" a char, a float, an int, a double...?

An int. It''s well-defined:

The type of an integer literal depends on its form, value, and suffix. If it is decimal and has no suffix, it has
the first of these types in which its value can be represented: int, long int; if the value cannot be represented
as a long int, the behavior is undefined. If it is octal or hexadecimal and has no suffix, it has the
first of these types in which its value can be represented: int, unsigned int, long int, unsigned
long int. If it is suffixed by u or U, its type is the first of these types in which its value can be represented:
unsigned int, unsigned long int. If it is suffixed by l or L, its type is the first of these
types in which its value can be represented: long int, unsigned long int. If it is suffixed by ul,
lu, uL, Lu, Ul, lU, UL, or LU, its type is unsigned long int.

quote:
That''s why five works (it has a known type), but the literal doesn''t (it''s type cannot unambiguously be inferred).

Yes it can.

##### Share on other sites

sark was perfectly right, with both her diagnosis of the problem in the code and with null's attitude problem, especially as null was extremely arrogant measured by her knowledge of the C++ const semantics.

But forgive me, Oluseyi and Magmai, your answers sure point out that your understanding of the topic is even inferior tho null's, thereby almost sanctioning her prematurely arrogant statement.

Oluseyi said, passing non-const when const was expected wouldn't normally impose a problem, and she was right. But then she said this exact thing was happening here, and that was utterly wrong. An implicitly const reference was about to be passed when a non-const reference was expected, and that means passing const when non-const is expected and must not compile.

Magmai then wittily responded that leaving out the references might make everything plusgood. Dear Magmai, imagine T's copy construction was costly. In this case the chance to do it only once instead of twice would be lost as soon as pass-by-reference was used. And even worse, imagine P1 was a type different from T, and P1 didn't provide copy semantics at all. Then construction from P1 using the construct method would be prohibited, although T's semantics supported it!
I honestly hope you're not working as a professional C++ programmer, for your sake and you employer's as well.

Finally, dear null, you're messing with template members without having understood the basic semantics of the language you are using, int this case the rules of pass-by-reference. And still you dare be as arrogant? Shame, I say, shame on you.

Hopeful to have beaten you, dear null, in terms of arrogance,

sincerely yours,

P.S. sark, you're the good one.

[edited by - shadi on September 11, 2002 9:28:31 PM]

##### Share on other sites
It doesn''t compile because you are missing a semi colon?
//dm.construct (5) // <- this one wouldn''t work!!

Joke aside. But even VC++ 6 compiles it fine. Did you edit the post or something? But I getting heap assertions failures when executing.

##### Share on other sites
quote:
Wow, attitude problem.

I waded through 150 posts of anti-American crud on another site supposedly dedicating a thread to remembering those who died last year in the terrorist attack, then I checked my other thread (which is still just a bunch of "are you sure you want to do this" posts), and then I created this topic. No one here seems to understand the problem, but one of DrPizza''s comments made me realize why my code does not work as I intended.

quote:
Ok, i put your code into my compiler, and changed all references going into construct() members and global functions const. It compiled fine when using a literal.

That''s fine, but I want the function to work with const and non-const literals and references. Which, I realize, is a rather tall order.

quote:
Passing a const value to a function expecting a non-const value is never a problem. Doing the inverse is.

The function templates are not even taking arguments by value.

quote:
It won''t work for 5 for the same reason this doesn''t compile:
const int &i = &5;

Try changing construct to use value semantics (lose the references).

Oh, now I''m *supposed* to pass by value.

quote:
An int.

So that is the problem! Any idea why it is not *const* int? That would solve my problem. Of course, I could try providing overloads for all of the intrinsic types, but I think that would require a lot of redundant code.

quote:
sark was perfectly right, with both her diagnosis of the problem in the code and with null''s attitude problem, especially as null was extremely arrogant measured by her knowledge of the C++ const semantics.

Rendering judgments from on high now, is it?

The compiler is supposed to detect whether the typename P1 is "int" or "const int." That is why passing a named constant works fine but not a literal. A literal''s type is "int", not "const int", so it P1& gets detected as "int&" to which we obviously cannot assign a literal. sark post did not provide any information that I did not already know, nor did you.

In the future if you desire an explanation, please refrain from narrating the thread.

quote:
But forgive me, Oluseyi and Magmai, your answers sure point out that your understanding of the topic is even inferior tho null''s, thereby almost sanctioning her prematurely arrogant statement.

(Why is everyone a "she" all of a sudden?)

quote:
Finally, dear null, you''re messing with template members without having understood the basic semantics of the language you are using, int this case the rules of pass-by-reference. And still you dare be as arrogant? Shame, I say, shame on you.

...I thought the Marx brothers were dead.

quote:
Hopeful to have beaten you, dear null, in terms of arrogance,

I agree completely. All hail the King of Pointless Titles!

##### Share on other sites
quote:
It doesn''t compile because you are missing a semi colon?

Alright, alright.

quote:
But even VC++ 6 compiles it fine.

You need to uncomment the line that reads:

//dm.construct (5) // <- this one wouldn''t work!!

and then comment out the other call to construct.

quote:
But I getting heap assertions failures when executing.

AFAIK you should not, unless perhaps there is some funky alignment issue with that char array. Or you could be leaving both constructor calls in there, which might result in some debug assertions.

##### Share on other sites
quote:
Original post by null_pointer
I cannot figure out why the code at the end of this source listing does not compile when I call it with a literal.

The hidden irony of this is that I saw your commented line in the other thread and I nearly posted to mention why it wouldn't compile. Then I remembered the amount of whining I've had directed at me in these forums for posting about something off-thread and decided not to (not from you, null_pointer). This forum in particular is getting to the point where its really hard to post much at all without getting heavily criticised - no matter whether you are asking a question or trying to help, or even just trying to have a casual discussion, someone always interprets you as doing so in "the wrong way". It makes me wonder if its really worth the bother.

[edited by - SabreMan on September 12, 2002 4:46:28 AM]

##### Share on other sites
quote:
So that is the problem! Any idea why it is not *const* int? That would solve my problem. Of course, I could try providing overloads for all of the intrinsic types, but I think that would require a lot of redundant code.

No idea. In the section on literals, they''re described as merely int (etc.), as the quotation above demonstrates.

Elsewhere, it does state literals are all r-values, except for string literals, which are l-values. I can''t see why that should be the case -- I''m sure there''s some reason for letting them be l-values but I can''t see it off the top of my head.

##### Share on other sites
Add const in front of the reference, and then you can do it. You probably got that far already though, and it''s probably not what you want to hear

It SHOULD not compile with the const variable either, but probably it does some internal shenanigans to store that const var in memory (thereby allowing one to cast away const-ness and take the address).

##### Share on other sites
yes sabreman.... you know much of criticizing heavily, don''t you? :D

##### Share on other sites
quote:
Add const in front of the reference, and then you can do it. You probably got that far already though, and it''s probably not what you want to hear

It SHOULD not compile with the const variable either, but probably it does some internal shenanigans to store that const var in memory (thereby allowing one to cast away const-ness and take the address).

Yes, this is exactly what i thought.

After a little testing, i discovered you can pass a const variable to a templated function that expects a non-const reference - BUT if you attempt to modify the value within the function you get compiling errors. If you dont, its fine. Well, thats my compiler anyway (MSVC7).

##### Share on other sites
quote:
This forum in particular is getting to the point where its really hard to post much at all without getting heavily criticised - no matter whether you are asking a question or trying to help, or even just trying to have a casual discussion, someone always interprets you as doing so in "the wrong way". It makes me wonder if its really worth the bother.

I certainly hope that you do not stop posting. Your posts are always well-informed and important. Off hand I cannot remember any whining, but maybe I have been too busy lately to notice. Can you send me an email with some links? Too often newbies do not quite know enough yet to understand why the criticisms of their code can prove important, so they get upset.

quote:
No idea. In the section on literals, they're described as merely int (etc.), as the quotation above demonstrates.

I cannot imagine why literals would not be const. It makes no sense to be able to modify them. Oh, well...

quote:
Elsewhere, it does state literals are all r-values, except for string literals, which are l-values. I can't see why that should be the case -- I'm sure there's some reason for letting them be l-values but I can't see it off the top of my head.

Perhaps it has something to do with supporting the C statement:

char* p = "hello"; // <- should be const!

quote:
Add const in front of the reference, and then you can do it. You probably got that far already though, and it's probably not what you want to hear

(Hmm...counting both threads, I'd say that makes five posts with this exact suggestion. No, maybe six.)

P1 is not supposed to be explicitly declared as const; the compiler is supposed to detect whether P1 is const or not. The only reason that it does not work is because the type of a literal is int, not const int as IMO it should be.

quote:
It SHOULD not compile with the const variable either, but probably it does some internal shenanigans to store that const var in memory (thereby allowing one to cast away const-ness and take the address).

No, not really. When a named constant is passed, P1 is properly detected as const int; therefore, P1& is const int&. Why? The const-ness is part of the type itself, so whether P1 is int or const int depends on what you pass to the function.

This really only matters in the situation I created. What I am trying to do is to create a function template that does some processing and then passes any number of arguments of any type to another function (in this case, T's constructor). It is similar in concept to a type-safe substitute for a va_arg_list.

To work correctly with all types of arguments, Px must be references. Had I used values, everything might as well be non-const anyway, but then T constructors expecting arguments by reference would silently get local temporaries from my function template. Ouch.

quote:
yes sabreman.... you know much of criticizing heavily, don't you? :D

Aw, give the guy a break, will ya?

[edited by - null_pointer on September 12, 2002 9:24:49 AM]

##### Share on other sites
I just caught another error in my code: the global reconstruct function should be using construct <T> instead of just construct because the global destruct returns a void pointer. That certainly explains why reconstruct had such odd error messages in some cases where construct and destruct would work fine.

##### Share on other sites
cv-qualifiers get stripped when determining types anyway.

##### Share on other sites
Which comment are you responding to? What are cv-qualifiers?

##### Share on other sites
const and volatile. You seemed to think that the const-ness was part of the type. Well, normally it is, but template type arguments will strip them.

##### Share on other sites
quote:
But I getting heap assertions failures when executing.

Ack! When I retyped the code, I put a call to delete in the destruct function. I should have been invoking the destructor directly with object->~T ().

##### Share on other sites
quote:
const and volatile. You seemed to think that the const-ness was part of the type. Well, normally it is, but template type arguments will strip them.

I do not see what you mean about template type arguments stripping the const and volative qualifiers. If I pass a const int to my construct function, P1 will be const int, and P1& will be const int&. Without this behavior, passing the named constant five would not work, but it does.

##### Share on other sites
quote:
Original post by null_pointer
I do not see what you mean about template type arguments stripping the const and volative qualifiers.

I mean the cv qualifiers get stripped.

That is, you can do this:

  template <typename T>void foo(T t){        T t2;        t2 = t; // this assignment is impossible if T is a const type}int main(void){        const int i = 0;        int j = 0;        foo(i); // the deduced type is not const, even though i is.        foo(j);}

If the cv qualifiers were kept, foo(i) would fail -- it''d try to assign to a const int which obviously isn''t allowed.

But it doesn''t. Why? Because T is int in both calls.

quote:
If I pass a const int to my construct function, P1 will be const int,

No it won''t. cv qualifiers are stripped.

quote:
and P1& will be const int&.

No it won''t. cv qualifiers are stripped.

quote:
Without this behavior, passing the named constant five would not work, but it does.

With this behaviour, the above code would not work. It does work.

Now, if you specify the type explicitly (that is, foo<const int>(i);) then I think that the type is indeed const (I haven''t checked the standard, but both g++ and Comeau will treat that as an error, though VC++ doesn''t).

##### Share on other sites
quote:
If the cv qualifiers were kept, foo(i) would fail -- it''d try to assign to a const int which obviously isn''t allowed.

But it doesn''t. Why? Because T is int in both calls.

Change foo to take a reference to T. Suddenly, you get the following errors:

error C2734: ''t2'' : const object must be initialized if not externerror C2166: l-value specifies const object

This tells me that T is indeed const, because t2 which is const is declared as:

T t2;

The conclusion is that cv-qualifiers are only stripped if the function template parameter is not a reference or pointer type. Which is what I am doing with my construct function. Which is why my P1 *is* const int, and my P1& *is* const int&, exactly as I described in an earlier post.

##### Share on other sites
quote:
Now, if you specify the type explicitly (that is, foo(i) then I think that the type is indeed const (I haven''t checked the standard, but both g++ and Comeau will treat that as an error, though VC++ doesn''t).

I know that you can definitely do that with class templates (i.e., std::auto_ptr <const CWnd> creates a pointer to a const CWnd object), but I have no idea if it can be done with function templates.

##### Share on other sites
No, the conclusion is that only the top-level qualifiers are stripped.

• ### Forum Statistics

• Total Topics
628662
• Total Posts
2984095

• 10
• 9
• 9
• 10
• 21


text:
# ListPlot - plotting values with different range

I have three tables: L, S and U. In first table I have values from range (0,1), in second from (0,2*10^27) and in the third one from (0,50). No I want to plot all this three tables (tables have the same domain) together. But because of a very different range, I see for example only values for U, and rest are just like a small points very near to axes x. I was trying to use ImageCompose, because I have mathematica 7, so I can't use Overlay, but this functions are only for two plots. Is any other solution how can I plot this three functions together and make the plot more legible?

-
How about plotting {L, S/(2 10^27), U/50} ? –  A.G. Dec 28 '13 at 22:35

## 1 Answer

It is all about rescaling, - visual with Overlay or @A.G. idea in the comment. So:

L = Abs[Rescale[Accumulate[RandomInteger[{-1, 1}, 1000]]]];
S = 2 10^27 Abs[Rescale[Accumulate[RandomInteger[{-1, 1}, 1000]]]];
U = 50 Abs[Rescale[Accumulate[RandomInteger[{-1, 1}, 1000]]]];

ListPlot[Rescale /@ {L, S, U}, Joined -> True]

-
I just don't understand, why you made: S = 50 Abs[Rescale[Accumulate[RandomInteger[{-1, 1}, 1000]]]];, because S is from (0;2*10^27) –  Ziva Dec 29 '13 at 12:05
@Ziva A typo, corrected. –  Vitaliy Kaurov Dec 29 '13 at 12:14


text:
# Draw a sketch showing how a water molecule orients it Draw a sketch showing how a...

###### Question:

draw a sketch showing how a water molecule orients it
Draw a sketch showing how a water molecule orients itself as it approaches a kion.

#### Similar Solved Questions

##### 2. (1,5 points) Answer the following questions: LT a) Indicate the type of crystalline defect shown...
2. (1,5 points) Answer the following questions: LT a) Indicate the type of crystalline defect shown in the image, and explain its relationship with the ductility of metals. b) The self-diffusion coefficient of iron in FCC iron is higher or lower than the diffusion coefficient of carbon in FCC in Jus...
##### Heinrich is a manufacturing engineer Company. He has determined the costs of producing a new product...
Heinrich is a manufacturing engineer Company. He has determined the costs of producing a new product to be as follows: Equipment cost: $288,000/year Equipment salvage value at EOY5 =$ 41,000 Variable cost per unit of production: $14.55 Overhead cost per year:$48,300 If the Miller Company uses a 5-...
##### You are doing a survey on UBC students. Participating students come from different majors and years....
You are doing a survey on UBC students. Participating students come from different majors and years. The participants are asked how much they pay for tuition this academic year. what is the variable of interest? OA. Study year of a student OB. Tuition fee paid by a student OC. UBC students OD. Major...
##### Heat flow by conduction problem
Over what distance must there be heat flow by conduction from theblood capillaries beneath the skin to the surface if thetemperature difference is 0.45C°?Assume 190 Wmust be transferredthrough the whole body's surface area of 1.4 m2. mm...


text:
+0

# Plz help

0
63
1

What is the exact value of the expression the square root of 294. − the square root of 24. + the square root 54.?

Guest Mar 14, 2017
Sort:

#1
+5102
0

sqrt(294) = 17.1464281994822467

sqrt(24) = 4.8989794855663562

sqrt(54) =7.3484692283495343

17.1464281994822467-4.8989794855663562+ 7.3484692283495343 = 19.5959179422654248

$$\sqrt{294} - \sqrt{24} + \sqrt{54} = 19.5959179422654248$$

rarinstraw1195  Mar 14, 2017

### 1 Online Users

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.  See details


text:
# 8.4: Double and Triple Integrals

We can extend the idea of a definite integral to more dimensions. If $$f(x,y)$$ is continuous over the rectangle $$R=[a,b]\times[c,d]$$ then,

$\label{c2v:eq:doubleint} \underset{R}{\iint}f(x,y)dA=\int_{a}^{b}\int_{c}^{d}f{(x,y)\, dy\, dx}=\int_{c}^{d}\int_{a}^{b}f{(x,y)\, dx\, dy}$

If $$f(x,y)\geq0$$, then the double integral represents the volume $$V$$ of the solid that lies above the rectangle $$R$$ and below the surface $$z=f(x,y)$$ (Figure $$\PageIndex{1}$$).

We can compute the double integral of Equation \ref{c2v:eq:doubleint} as:

$\underset{R}{\iint}f(x,y)dA=\int_{a}^{b}\left[ \int_{c}^{d}f{(x,y)\, dy} \right]dx \nonumber$

meaning that we will first compute

$\int_{c}^{d}f{(x,y)\, dy} \nonumber$

holding $$x$$ constant and integrating with respect to $$y$$. The result will be a function containing only $$x$$, which we will integrate between $$a$$ and $$b$$ with respect to $$x$$.

For example, let’s solve $$\int_{0}^{3}\int_{1}^{2}{x^2 y\; dy\; dx}$$. We’ll start by solving $$\int_{1}^{2}{x^2 y\; dy}$$ holding $$x$$ constant:

$\int_{1}^{2}{x^2 y\; dy}=x^2\int_{1}^{2}{y\; dy}=\dfrac{3}{2}x^2 \nonumber$

Now we integrate this function from 0 to 3 with respect to $$x$$:

$\int_{0}^{3}\int_{1}^{2}{x^2 y\; dy\; dx}=\int_{0}^{3}{\dfrac{3}{2}x^2 \; dx}=\dfrac{27}{2} \nonumber$

You can of course integrate from 0 to 3 first with respect to $$x$$ holding $$y$$ constant, and then integrate the result with respect to $$y$$ from 1 to 2. Try it this way and verify you get the same result.

Triple integrals work in the same way. If $$f(x,y,z)$$ is continuous on the rectangular box $$B=[a,b]\times[c,d]\times[r,s]$$, then

$\label{c2v:eq:tripleint} \underset{B}{\iiint}f(x,y,z)dV=\int_{r}^{s}\int_{c}^{d}\int_{a}^{b}f{(x,y)\, dx\, dy\, dz}$

This iterated integral means that we integrate first with respect to $$x$$ (keeping $$y$$ and $$z$$ fixed), then we integrate with respect to $$y$$ (keeping $$z$$ fixed), and finally we integrate with respect to $$z$$. There are five other possible orders in which we can integrate, all of which give the same value.

Do you need a refresher on double and triple integrals? Check the videos below before moving on to the physical chemistry examples.

Triple integrals are used very often in physical chemistry to normalize probability density functions. For example, in quantum mechanics, the absolute square of the wave function, $$\left | \psi (x,y,z) \right |^2$$, is interpreted as a probability density, the probability that the particle is inside the volume $$dx.dy.dz$$. Since the probability of finding the particle somewhere in space is 1, we require that:

$\label{c2v:eq:calculus2v_normalization} \int_{-\infty }^{\infty }\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }{\left | \psi (x,y,z) \right |}^2\; dx \;dy \;dz=1$

We already mentioned wave functions in Section 2.3, where we showed that

$\left | \psi (x,y,z) \right |^2=\psi^*(x,y,z) \psi(x,y,z) \nonumber$

The normalization condition, therefore, can also be written as

$\label{c2v:eq:calculus2v_normalization2} \int_{-\infty }^{\infty }\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }{ \psi^*\psi }\; dx \;dy \;dz=1$

Example $$\PageIndex{1}$$

In quantum mechanics, the lowest energy state of a particle confined in a three-dimensional box is represented by

$\psi (x,y,z)=A\sin{\dfrac{\pi x}{a}}\sin{\dfrac{\pi y}{b}}\sin{\dfrac{\pi z}{c}}\; if\; \left\{ \begin{matrix} 0< x< a\\ 0< y< b\\ 0< z< c\\ \end{matrix} \right.$

and

$$\psi (x,y,z)=0$$ otherwise (outside the box).

Here, $$A$$ is a normalization constant, and $$a$$,$$b$$ and $$c$$ are the lengths of the sides of the box. Since the probability of finding the particle somewhere in space is 1, we require that

$\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }{\left | \psi (x,y,z) \right |}^2\; dx \;dy \;dz=1 \nonumber$

Find the normalization constant $$A$$ in terms of $$a,b,c$$ and other constants.

Solution

Because $$\psi(x,y,z)=0$$ outside the box,

$\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }\int_{-\infty }^{\infty }{\left | \psi (x,y,z) \right |}^2\; dx \;dy \;dz=\int_{0 }^{c }\int_{0 }^{b }\int_{0 }^{a }{\left | \psi (x,y,z) \right |}^2\; dx \;dy \;dz = \left | \psi (x,y,z) \right |^2=\psi^* (x,y,z) \psi(x,y,z) \nonumber$

However, because in this case the function is real,

$\left | \psi (x,y,z) \right |^2=\left ( \psi (x,y,z) \right )^2$

$\int_{0 }^{c }\int_{0 }^{b }\int_{0 }^{a }{\left | \psi (x,y,z) \right |}^2\; dx \;dy \;dz=\int_{0 }^{c }\int_{0 }^{b }\int_{0 }^{a }{A^2 \sin^2\left( \dfrac{\pi x}{a}\right)\sin^2\left( \dfrac{\pi y}{b}\right)\sin^2\left( \dfrac{\pi z}{c}\right)}\; dx \;dy \;dz=1 \nonumber$

$\int_{0 }^{c }\int_{0 }^{b }\int_{0 }^{a }{A^2 \sin^2\left( \dfrac{\pi x}{a}\right)\sin^2\left( \dfrac{\pi y}{b}\right)\sin^2\left( \dfrac{\pi z}{c}\right)}\; dx \;dy \;dz= A^2\int_{0 }^{a }{\sin^2\left( \dfrac{\pi x}{a}\right)}dx\int_{0 }^{b }{\sin^2\left( \dfrac{\pi y}{b}\right)}dy\int_{0 }^{c }{\sin^2\left( \dfrac{\pi z}{c}\right)}dz \nonumber$

Using the formula sheet, we get

$\int_{0 }^{a }{\sin^2\left( \dfrac{\pi x}{a}\right)}dx=a/2 \nonumber$

And therefore,

$A^2\int_{0 }^{a }{\sin^2\left( \dfrac{\pi x}{a}\right)}dx\int_{0 }^{b }{\sin^2\left( \dfrac{\pi y}{b}\right)}dy\int_{0 }^{c }{\sin^2\left( \dfrac{\pi z}{c}\right)}dz=A^2 \dfrac{a}{2} \dfrac{b}{2}\dfrac{c}{2}=\dfrac{A^2abc}{8}=1 \nonumber$

Solving for $$A$$:

$\displaystyle{\color{Maroon}A=\left( \dfrac{8}{abc}\right)^{1/2}}$


text:
# Lessening my Criticism of OpenShot

In this earlier posting, I criticized a non-linear video editor named “OpenShot”, stating that it was unstable. I think I need to both lessen, and pinpoint my criticism of this software.

At the time I was mainly having problems with the Windows version of OpenShot, which its developer worked long and hard to port to Windows. But the actual problem with OpenShot under Windows has to do with an environment variable named ‘QT_HOME’. When we install certain Linux-centric software under Windows, we are often instructed to set our ‘PATH’ variable to point to it. But with Qt-libraries, there is an additional variable named ‘QT_HOME’, which states what folders the Qt-libraries are to be found in. This is a global variable under Windows, even though we may have different examples of software installed, that use different versions of the Qt-libraries.

The way it is with me, I have ‘Kleopatra’ installed, which is also a Qt-based application which has been ported to Windows. Normally, a Windows executable will look in its own folder first, for an .DLL Files it needs, before looking in other directories.

But OpenShot is an application that comes with many Qt-library-files, located in its own directory or directories. And so to point the executable to these libraries, the OpenShot installer sets this environment variable.

The problem becomes, that when I next try to run Kleopatra, its Qt-executable respects this variable, and starts to try loading the Qt-libraries that shipped with OpenShot. Kleopatra does this, even though the developers of Qt have apparently forgotten that this variable exists because its observance is built-in to Qt.

The problem here is not strictly the fault of OpenShot developers. With Qt applications, the slightest mismatch between the Qt version the application was linked against, from the shared libraries it will ink to again, when it is run, will cause typical error messages. This problem has already happened to many users, who install Qt-based applications under Linux, that were not compiled and linked in-stream with the packaged version of Qt. In fact, when we install certain Qt-based applications that are out-of-tree in this way, we often need to do something like this:

rm -f libQt*.so*

In the folder of the software in question, to force that software to link to the Qt-libraries we have installed globally, instead of linking to its own version of these libraries, before the software will run.

So in my case, when the time came for Kleopatra to ask me for my passphrases, in order to unlock my private keys, this library-mismatch prevented the software from working. At first this might sound like some sort of malware-problem, but is really just a library-incompatibility-problem.

And so the only way I was able to clean up this problem on my Windows 7 machine ‘Mithral’, was to uninstall the Windows version of OpenShot, which its authors provided so carefully, and to delete this environment variable as well. Apparently, if this variable is set and the folder empty – or nonexistent – this is not enough to convince a Qt-application to link to its own Qt-libraries. In my case I needed to delete this variable as well, before Kleopatra became stable again.

Now, if a user only feels that he will be running software on his Windows computer, that uses one, global Qt-version, this could all look very different. But in my usage-scenario,

• The way I set up my Windows machine is different, and
• I have access to OpenShot on my Linux machines, for which reason I do not need this software under Windows.

I think that I had the additional problem on the machine I name ‘Phoenix’, that OpenShot once crashed my X-server, when instructed to play back a corrupted video file, in its preview window, but at full quality. Yet, I have already learned that ‘Phoenix’ has a weak, fragile instance of the X-server running… So this may also not strictly be the fault of OpenShot developers.

Dirk

## 2 thoughts on “Lessening my Criticism of OpenShot”

1. Tim says:

It really is a pile of crap. It crashes almost constantly and is not a useable software anymore. It was basic but stable and useful back in 2006 or so. All the linux video editors are terrible and not worth spending a minute using.

This site uses Akismet to reduce spam. Learn how your comment data is processed.


text:
# Measurement of Branching Fractions in Radiative B Decays to eta K gamma and Search for B Decays to eta' K gamma

Research paper by The BABAR Collaboration, B. Aubert

Indexed on: 29 Mar '06Published on: 29 Mar '06Published in: High Energy Physics - Experiment

#### Abstract

We present measurements of the B->eta K gamma branching fractions and upper limits for the B->eta' K gamma branching fractions. For B->eta K+ gamma we also measure the time-integrated charge asymmetry. The data sample, collected with the BaBar detector at the Stanford Linear Accelerator Center, represents 232 million produced B B-bar pairs. The results for branching fractions and upper limits at 90% C.L. in units of 10^{-6} are: Br(B0->eta K0 gamma)=11.3+2.8-2.6+/-0.6, Br(B+->eta K+gamma)=10.0+/-1.3+/-0.5, Br(B0->eta' K0 gamma)<6.6, Br(B+->eta' K+ gamma)<4.2. The charge asymmetry in the decay B+->eta K+ gamma is Ach =-0.09+/-0.12+/-0.01. The first errors are statistical and the second systematic.


text:
LEARNATHON
III

Competition for grade 6 to 10 students! Learn, solve tests and earn prizes!

### Theory:

Nature and natural phenomena are studied in a branch of science called Physics. All science subjects are built on the foundation of physics, which is purely based on experimental observations. These principles and observations give us a better understanding of nature.

Scientific theories are validated based on the results of various experiments. Also, many physical quantities are used in these theories. All scientific researches and experiments begin with measurement.
Measurement is essential in our daily lives.
Measurement is the method of determining an unknown physical quantity (a number) by comparing it to a known quantity (unit).
A physical quantity is a quantity that measures the properties of material or substances. Some of the physical quantities are length, mass, temperature and volume.
For a perfect measurement, three things are required. They are,
1. Instrument
2. Standard quantity
3. Unit
For instance, if the length of the table is $$1\ metre$$, then '$$1$$' is the magnitude and '$$metre$$' is the unit selected to express the length, which is a physical quantity. Here, the meter scale is the instrument used to measure the length. This complete process is known as measurement.

Unit systems
Measurement is used everywhere around us. Various unit systems are used by people in different parts of the world for measurement. The common systems of units are given below.

 Unit system Length Mass Time CGS centimetre gram second MKS metre kilogram second FPS foot pound second


text:
Degrees: Pharmacy, Biotechnology
Date: December 17, 2018

## Question 1

The chart below represents the cumulative distribution of the number of daily defective drugs produced by a machine in a sample of 40 days.

1. Construct the frequency table of the number of defective drugs.
2. Draw the box and whiskers plot of the number of defective drugs.
3. Study the symmetry of the distribution of the number of defective drugs.
4. If the number of defective drugs produced by a second machine follows the equation $y=3x+2$, where $x$ and $y$ are the number of defective drugs with the first and the second machines respectively, in which machine is more representative the mean of the number of defective drugs?
5. Which number of defective drugs is relatively smaller, 3 drugs in the first machine or 9 in the second one?

## Question 2

A pharmaceutical laboratory produces two models of blood pressure monitor, one for the arm and the other for the wrist. To compare the accuracy of both blood pressure monitors, a quality control has been conducted with a sample of 20 patients, getting the following results:

$\sum x_i=265.4$ mmHg, $\sum y_i=262.5$ mmHg , $\sum z_i=262.4$ mmHg,
$\sum x_i^2=3701.14$ mmHg$^2$, $\sum y_i^2=3629.41$ mmHg$^2$, $\sum z_i^2=3615.38$ mmHg$^2$,
$\sum x_iy_j=3658.28$ mmHg$^2$, $\sum x_iz_j=3655.95$ mmHg$^2$, $\sum y_jz_j=3613.97$ mmHg$^2$.

Where $X$ is the blood pressure with the arm monitor, $Y$ with the wrist monitor and $Z$ the real blood pressure.

1. Which blood pressure monitor predicts better the real blood pressure with a linear regression model?
2. If a patient has a real blood pressure of $13.5$ mmHg, what is the expected blood pressure given by the arm blood pressure monitor?

## Question 3

The regression line of $Y$ on $X$ is $y=1.2x-0.6$.

1. Which of the following lines can not be the regression line of $X$ on $Y$. Justify the answer.
1. $x=0.9y-0.6$
2. $x=-0.7y+0.4$
3. $x=0.8y-0.7$
4. $x=-0.6y-0.5$
5. $x=0.4y-0.6$
6. $x=-0.5y+0.9$
2. Considering only the ones that can be the regression line of $X$ on $Y$, which one will give better predictions? Justify the answer.

## Question 4

In an epidemiological study a sample of 400 persons with breast cancer was drawn and another sample of 1200 persons without breast cancer. In the sample of persons with breast cancer there was 180 smokers, while in the sample of persons without breast cancer there was 1140 non-smokers.

1. Compute the relative risk of developing cancer smoking and interpret it.
2. Compute the odds ratio of developing cancer smoking and interpret it.

## Question 5

We want to develop a diagnostic test to rule out a disease when the outcome of the test is negative (negative predictive value) with a probability 90% at least. It is known that the prevalence of the disease in the population is 15% and the sensitivity of the test is set to 80%.

1. What must be the minimum specificity of the test?
2. Using the previous specificity, compute the probability of a correct diagnostic.
3. If we apply the same test two times to the same patient with negative outcomes, what is the probability of ruling out the disease?

## Question 6

It is known that in a city one out of 20 persons, in average, has blood type $AB$.

1. If we draw randomly 200 blood donors, what is the probability of having at least 5 with blood type $AB$?
2. If we draw randomly 10 blood donors, what is the probability of having more than 8 with blood type different of $AB$?

## Question 7

In a course there are 150 females and 80 males. It is known that the distribution of scores of females and males are normal with the same standard deviation. It is also known that there are 120 females and 56 males with a score greater than 5, and 36 males with a score between 5 and 7.

1. Compute the means and standard deviations of the distributions of scores of females and males.
2. How many females will have a score between 4.5 and 8?
3. Above what score will be 10% of females?


text:
doc-src/System/basics.tex
 author wenzelm Wed, 25 Aug 1999 20:49:02 +0200 changeset 7357 d0e16da40ea2 parent 7252 d3ed595dd772 child 7849 29a2a1d71128 permissions -rw-r--r--
proper bootstrap of HOL theory and packages;

% $Id$

\chapter{Basic concepts}

The \emph{Isabelle System Manual} describes Isabelle together with
related tools and user interfaces as seen from an outside (operating
system oriented) view.  See the \emph{Isabelle Reference Manual} for
all internal {\ML} level user commands, on the other hand.

\medskip The Isabelle system level environment is based on a few
general concepts:
\begin{itemize}
\item The \emph{Isabelle settings mechanism}, which provides
environment variables to all Isabelle programs (including tools and
user interfaces).
\item \emph{Isabelle proper} (\ttindex{isabelle}), which runs logic
sessions, both interactively or in batch mode. In particular,
\texttt{isabelle} abstracts over the invocation of the actual {\ML}
system to be used.
\item The \emph{Isabelle tools wrapper} (\ttindex{isatool}), which
provides a generic startup platform for Isabelle related utilities.
Thus tools automatically benefit from the settings mechanism.
Furthermore, the shell's search path is kept clean from many small
programs.
\item The \emph{Isabelle interface wrapper}
(\ttindex{Isabelle}\footnote{Note the capital \texttt{I}!}), which
provides some abstraction over the actual user interface to be used.
\end{itemize}

\medskip The beginning user would probably just run one of the
interfaces (by invoking the capital \texttt{Isabelle}), and maybe some
basic tools like \texttt{doc} (see \S\ref{sec:tool-doc}).  This
assumes that the system has already been installed properly, of
course.\footnote{In case you have to do this yourself, see the
\ttindex{INSTALL} file in the top-level directory of the
distribution. The information provided there should be sufficient as
a start.}

\section{Isabelle settings} \label{sec:settings}

The Isabelle system heavily depends on the \emph{settings
mechanism}\indexbold{settings}. Basically, this is just a collection
of environment variables, e.g.\ \texttt{ISABELLE_HOME},
\texttt{ML_SYSTEM}, \texttt{ML_HOME}.  These variables are \emph{not}
intended to be set directly from the shell!

Isabelle employs a somewhat more sophisticated scheme of
\emph{settings files} --- one for site-wide defaults, another for
optional user-specific modifications.  With all configuration
variables in just a few places, this is much more maintainable and
user-friendly than ordinary shell environment variables.

In particular, we avoid the typical situation where prospective users
of a software package are told to put this and that in their shell
startup scripts, before being able to actually run it. Isabelle
requires none such administrative chores of its end-users --- the
executables can be invoked straight away. Usually, users would just
want to put the Isabelle \texttt{bin} directory into their shell's
search path, of course.

\subsection{Building the environment}

Whenever any of the Isabelle executables is run, their settings
environment is built as follows:

\begin{enumerate}
\item The special variable \settdx{ISABELLE_HOME} is determined
automatically from the location of the binary that has been run.

You should not try to set \texttt{ISABELLE_HOME} manually. Also note
that the Isabelle executables have to be run from their original
location in the distribution directory --- copying or linking them
somewhere else just won't work!

\item The file \texttt{\$ISABELLE_HOME/etc/settings} ist run as a shell script with the auto-export option for variables enabled. This file typically contains a rather long list of shell variable assigments, thus providing the site-wide default settings. The Isabelle distribution already contains a global settings file with sensible defaults for most variables. When installing the system, only a few of these have to be adapted (most likely \texttt{ML_SYSTEM} etc.). \item The file \texttt{\$ISABELLE_HOME_USER/etc/settings} (if it
exists) is run the same way as the site default settings. The
variable \texttt{ISABELLE_HOME_USER} has already been set before ---
usually to \texttt{\~\relax/isabelle}.

file \texttt{etc/user-settings.sample} in the distribution.
Typically, a user settings file would contain only a few lines, just
the assigments that are really needed.  One should definitely
\texttt{\$ISABELLE_HOME/etc/settings}. This could cause very annoying maintainance problems later, when the Isabelle installation is updated or changed otherwise. \end{enumerate} Note that settings files are actually full GNU bash scripts. So one may use complex shell commands, say \texttt{if} or \texttt{case} statements to set variables depending on the system architecture or other environment variables, for example. Such advanced features should be added only with great care, though. In particular, external environment references should be kept at a minimum. \medskip A few variables are somewhat special: \begin{itemize} \item \settdx{ISABELLE} and \settdx{ISATOOL} are set automatically to the absolute path names of the \texttt{isabelle} and \texttt{isatool} executables, respectively. \item \settdx{ISABELLE_PATH} and \settdx{ISABELLE_OUTPUT} will have the {\ML} system identifier (according to \texttt{ML_IDENTIFIER} automatically appended to their values. \end{itemize} \medskip The Isabelle settings scheme is basically quite simple, but non-trivial. For debugging purposes, the resulting environment may be inspected with the \texttt{getenv} utility, see \S\ref{sec:tool-getenv}. \subsection{Common variables} Below is a reference of common Isabelle settings variables. Note that the list is somewhat open-ended. Third-party utilities or interfaces may add their own selection. Variables that are special in some sense are marked with *. \begin{description} \item[\settdx{ISABELLE_HOME}*] is the location of the top-level Isabelle distribution directory. This is automatically determined from the Isabelle executable that has been invoked. Do not try to set \texttt{ISABELLE_HOME} yourself from the shell. \item[\settdx{ISABELLE_HOME_USER}] is the user-specific counterpart of \texttt{ISABELLE_HOME}. The default value is \texttt{\~\relax/isabelle}, under rare circumstances this may be changed in the global setting file. Typically, the \texttt{ISABELLE_HOME_USER} directory mimics \texttt{ISABELLE_HOME} to some extend. In particular, site-wide defaults may be overridden by a private \texttt{etc/settings}. \item[\settdx{ISABELLE}*, \settdx{ISATOOL}*] are automatically set to the full paths of the \texttt{isabelle} and \texttt{isatool} executables, respectively. Thus other tools and scripts need not assume that the Isabelle \texttt{bin} directory is on the current search path of the shell. \item[\settdx{ML_SYSTEM}, \settdx{ML_HOME}, \settdx{ML_OPTIONS}, \settdx{ML_PLATFORM}, \settdx{ML_IDENTIFIER}*] specify the underlying {\ML} system to be used for Isabelle. The choice of \texttt{ML_SYSTEM} identifiers is quite fixed, see the global \texttt{etc/settings} file for some examples. The actual compiler binary will be run from directory \texttt{ML_HOME}, with \texttt{ML_OPTIONS} as first arguments on the command line. The optional \texttt{ML_PLATFORM} specifies the binary format of ML heap images, which is useful for cross-platform installations. The value of \texttt{ML_IDENTIFIER} is (automatically) obtained by composing \texttt{ML_SYSTEM} and \texttt{ML_PLATFORM}. \item[\settdx{ISABELLE_PATH}*] is a list of directories (separated by colons) where Isabelle logic images may reside. Note that the value of \texttt{ML_IDENTIFIER} is appended to each component automatically. \item[\settdx{ISABELLE_OUTPUT}*] is a directory where output heap files should be stored by default. The \texttt{ML_SYSTEM} identifier is appended here, too. \item[\settdx{ISABELLE_BROWSER_INFO}] is the directory where theory browser information (HTML and graph data) is stored (see also \S\ref{sec:info}). The default value is \texttt{\$ISABELLE_HOME_USER/browser_info}.

\item[\settdx{ISABELLE_LOGIC}] specifies the default logic to load if
none is given explicitely by the user --- e.g.\ when running
\texttt{isabelle} directly, or some user interface.

\item[\settdx{ISABELLE_USEDIR_OPTIONS}] is implicitly prefixed to the
\S\ref{sec:tool-usedir}). This typically contains compilation
options for object-logics --- \texttt{usedir} is the basic utility
that builds them (cf.\ the \texttt{IsaMakefile}s in the
distribution).

\item[\settdx{ISABELLE_TOOLS}] is a colon separated list of
directories that are scanned by \texttt{isatool} for utility

\item[\settdx{ISABELLE_DOCS}] is a colon separated list of directories
with documentation files.

\item[\settdx{DVI_VIEWER}] specifies the command to be used for
displaying \texttt{dvi} files.

\item[\settdx{ISABELLE_INSTALL_FONTS}] determines the way that the
Isabelle symbol fonts are installed into your currently running X11
display server. X11 fonts are a non-trivial issue, see

\item[\settdx{ISABELLE_TMP_PREFIX}] is the prefix from which any
\texttt{isabelle} session derives an individual directory for
temporary files.  The default is somewhere in \texttt{/tmp}.

\item[\settdx{ISABELLE_INTERFACE}] is an identifier that specifies the
actual user interface that the capital \texttt{Isabelle} should
invoke.  Currently available are \texttt{none}, \texttt{xterm} and
\texttt{emacs}. See \S\ref{sec:interface} for more details.

\end{description}

\section{Isabelle proper --- \texttt{isabelle}}

The \ttindex{isabelle} executable runs logic sessions --- either
interactively or in batch mode. It provides an abstraction over the
underlying {\ML} system, and over the actual heap file locations. Its
usage is:
\begin{ttbox}
Usage: isabelle [OPTIONS] [INPUT] [OUTPUT]

Options are:
-I           startup Isar interaction mode
-e MLTEXT    pass MLTEXT to the ML session
-m MODE      add print mode for output
-q           non-interactive session
-u           pass 'use"ROOT.ML";' to the ML session
-w           reset write permissions on OUTPUT

INPUT (default "\$ISABELLE_LOGIC") and OUTPUT specify in/out heaps. These are either names to be searched in the Isabelle path, or actual file names (containing at least one /). If INPUT is "RAW_ML_SYSTEM", just start the bare bones ML system. \end{ttbox} Input files without path specifications are looked up in the \texttt{ISABELLE_PATH} setting, which may consist of multiple components separated by colons --- these are tried in order. Likewise, base names are relative to the directory specified by \texttt{ISABELLE_OUTPUT}. In any case, actual file locations may also be given by including at least one \texttt{/} in the name (hint: use \texttt{./} to refer to the current directory). \subsection*{Options} If the input heap file does not have write permission bits set, or the \texttt{-r} option is given explicitely, then the session will be read-only. That is, the {\ML} world cannot be committed back into the logic image. Otherwise, a writable session enables commits into either the input file, or into an alternative output heap file (in case this is given as the second argument on the command line). The read-write state of sessions is determined at startup only, it cannot be changed intermediately. Also note that heap images may require considerable amounts of disk space. Users are responsible themselves to dispose their heap files when they are no longer needed. \medskip The \texttt{-w} option makes the output heap file read-only after terminating. Thus subsequent invocations cause the logic image to be read-only automatically. \medskip Using the \texttt{-e} option, arbitrary {\ML} code may be passed to the Isabelle session from the command line. Multiple \texttt{-e}'s are evaluated in order. Strange things may happen when errorneous {\ML} code is given. Also make sure that the {\ML} commands are terminated properly by semicolon. \medskip The \texttt{-u} option is a shortcut for \texttt{-e}, passing \texttt{use"ROOT.ML";}'' to the {\ML} session. \medskip The \texttt{-m} option adds identifiers of print modes to be made active for this session. Typically, this is used by some user interface, for example to enable output of mathematical symbols from a special screen font. \medskip Isabelle normally enters an interactice top-level loop (after processing the \texttt{-e} texts). The \texttt{-q} option inhibits this, thus providing a pure batch mode facility. \medskip The \texttt{-I} option makes Isabelle enter Isar interaction mode on startup, instead of the primitive {\ML} top-level. This flag is usually enabled by default when running Isabelle via some user interface, but it is \emph{not} for the basic \texttt{isabelle} program. \subsection*{Examples} Run an interactive session of the default object-logic (as specified by the \texttt{ISABELLE_LOGIC} setting) like this: \begin{ttbox} isabelle \end{ttbox} Usually \texttt{ISABELLE_LOGIC} refers to one of the standard logic images, which are read-only by default. A writable session --- based on \texttt{FOL}, but output to \texttt{Foo} (in the directory specified by the \texttt{ISABELLE_OUTPUT} setting) --- may be invoked as follows: \begin{ttbox} isabelle FOL Foo \end{ttbox} Ending this session normally (e.g.\ by typing control-D) dumps the whole {\ML} system state into \texttt{Foo}. Be prepared for several megabytes! The \texttt{Foo} session may be continued later (still in writable state) by: \begin{ttbox} isabelle Foo \end{ttbox} A read-only \texttt{Foo} session may be started by: \begin{ttbox} isabelle -r Foo \end{ttbox} \medskip The next example demonstrates batch execution of Isabelle. We print a certain theorem of \texttt{FOL}: \begin{ttbox} isabelle -e "prth allE;" -q -r FOL \end{ttbox} Note that the output text will be usually interspersed with some garbage produced by the {\ML} compiler. \section{The Isabelle tools wrapper --- \texttt{isatool}} \label{sec:isatool} All Isabelle related utilities are called via a common wrapper --- \ttindex{isatool}: \begin{ttbox} Usage: isatool TOOL [ARGS ...] Start Isabelle utility program TOOL with ARGS. Pass "-?" to TOOL for more specific help. Available tools are: browser - Isabelle theory graph browser doc - view Isabelle documentation \dots \end{ttbox} Basically, Isabelle tools are ordinary executable scripts. These are run within the same settings environment as Isabelle proper, see \S\ref{sec:settings}. The set of available tools is collected by isatool from the directories listed in the \texttt{ISABELLE_TOOLS} setting. Do not try to call the scripts directly. Neither should you add the tool directories to your shell's search path. \medskip See chapter~\ref{ch:tools} for descriptions of most utilities that come with the Isabelle distributions. Third-parties may add their own, of course. \section{The Isabelle interface wrapper --- \texttt{Isabelle}} \label{sec:interface} Isabelle is a generic theorem prover, even w.r.t.\ its user interface. The \ttindex{Isabelle} command (note the capital \texttt{I}) provides a uniform way for end-users to invoke a certain interface; which one to start actually is determined by the \settdx{ISABELLE_INTERFACE} setting variable. Basically, there are two ways to specify an interface: either by giving an identifier that the Isabelle distribution knows about, or specifying an actual path name (containing a slash \texttt{/}'') of some executable. Currently, the following interface identifiers are recognized: \begin{ttdescription} \item[none] is just a pass-through to \texttt{isabelle}. Thus \texttt{Isabelle} basically becomes an alias for \texttt{isabelle}. \item[xterm] refers to a simple xterm based interface which is part of the Isabelle distribution. \item[emacs] refers to David Aspinall's \emph{Isamode}\index{user interface!Isamode} for emacs. Isabelle just provides a wrapper for this, the actual Isamode distribution is available elsewhere \cite{isamode}. \end{ttdescription} The factory default for \texttt{ISABELLE_INTERFACE} is \texttt{xterm}. This interface runs \texttt{isabelle} within its own xterm window. Usually, display of mathematical symbols from the Isabelle font is also enabled (see \S\ref{sec:tool-installfonts} for font configuration issues). Furthermore, different kinds of identifiers in logical terms are highlighted appropriately, e.g.\ free variables in bold and bound variables underlined. There are some more options available. Just pass \texttt{-?} to the \texttt{xterm} interface to have its usage printed. \medskip Proof~General\index{user interface!Proof General} of LFCS Edinburgh is another, much more advanced interface. It supports both classic Isabelle (as \texttt{ProofGeneral/isa}) and Isabelle/Isar (as \texttt{ProofGeneral/isar}). Note that the latter is slightly better supported, and more robust. Proof~General already ships with appropriate executable scripts to be run as Isabelle interface. Thus a typical setup of Proof~General for Isabelle/Isar would be like this: \begin{ttbox} ISABELLE_INTERFACE=\$ISABELLE_HOME/contrib/ProofGeneral/isar/interface
PROOFGENERAL_OPTIONS="-p emacs -u true"
\end{ttbox}


text:
Temporarily Change Equation Margin

Let's say I have a document with a narrow text width and lots of margin to spare. If I had a particularly long equation that failed to fit into the given width, the general solution would be to break the equation across multiple lines.

But if a particular equation was not well suited to that approach, is there a convenient way to temporarily change the margins just for a given equation? I provide a kludged approach below, but it requires manually inserted \vspace of an empirically derived magnitude. It just seems that there should be a better way. It also requires a specification of the widened textwidth, but that is OK, since I would prefer some uniformity of expansion, if the technique has to be used more than once in a document.

\documentclass{article}
\usepackage[nopar]{lipsum}
\begin{document}
\lipsum[1]
$$y = mx + b$$
\lipsum[2]
% HERE IS THE KLUDGE
\par\vspace{-.5\topskip}\noindent\makebox[\textwidth]{\begin{minipage}{7in}
$$E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x$$
\end{minipage}}\vspace{\topskip}\par
% END KLUDGE
\lipsum[2]
$$\nu = c / \lambda$$
\end{document}

As an afterthought, I would note that \leftskip and \rightskip approaches do not seem to change what happens inside the equation.

-
Please, don't inflict this to your readers. – egreg Jan 12 at 11:29
@egreg I wouldn't do it, but I am trying to help a colleague who does not wish to break his equation across lines. I suppose the "help" you would recommend would be to tell him to not do it this way. – Steven B. Segletes Jan 12 at 11:31

I'd avoid doing this as hard as I can. But…

\documentclass{article}
\usepackage{amsmath,environ}

\usepackage[nopar]{lipsum}

\makeatletter
\NewEnviron{widerequation}{%
\begin{equation*}
\sbox\z@{\let\label\@gobble$\displaystyle\BODY$}
\makebox[\textwidth]{%
\begin{minipage}{\dimexpr\wd\z@+3em}
\vspace{-\baselineskip}
$$\BODY$$
\end{minipage}%
}
\end{equation*}
}

\begin{document}
\lipsum[2]
$$y = mx + b$$
\lipsum[2]
\begin{widerequation}\label{test}
E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x +
x + x + x + x + x + x + x + x + x
\end{widerequation}
\lipsum[2]
$$\nu = c / \lambda$$
See \eqref{test}
\end{document}

-
seems to me that this might allow the equation to go right off the paper. wouldn't a warning be friendly in case the thing gets too wide? – barbara beeton Jan 12 at 17:10
@barbarabeeton My idea would be to add an error message: “Wrong typesetting requested” ;-) – egreg Jan 12 at 17:22
@egreg Can this work for other math environments like align? – EthanAlvaree Mar 29 at 19:23

Here is a solution with the eqparbox package, which allows measurement of tagged boxes. It requires two compilations:

\documentclass{article}
\usepackage[nopar]{lipsum}
\usepackage{mathtools}
\usepackage{eqparbox}

\begin{document}

\lipsum[1]
\noindent\makebox[\textwidth]{\begin{minipage}{\dimexpr\eqboxwidth{Eq}+1Acm\relax}
\medskip
$$\eqmakebox[Eq]{\ensuremath{E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x}}$$
\end{minipage}}\vspace{\belowdisplayskip}
\lipsum[2]
$$\nu = c / \lambda$$

\end{document}

-

It seems that you could also use the adjustwidth environment from the changepage package:

\newenvironment{widerequation}{%
\begin{adjustwidth}{-2cm}{-2cm}$$} {$$\end{adjustwidth}}

Here's a complete MWE:

% arara: pdflatex
\documentclass{article}
\usepackage{amsmath}
\usepackage{changepage}
\usepackage[nopar]{lipsum}

\newenvironment{widerequation}{%
\begin{adjustwidth}{-2cm}{-2cm}$$} {$$\end{adjustwidth}}

\begin{document}
\lipsum[2]
$$y = mx + b$$
\lipsum[2]
\begin{widerequation}\label{test}
E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x +
x + x + x + x + x + x + x + x + x
\end{widerequation}
\lipsum[2]
$$\nu = c / \lambda$$
See \eqref{test}
\end{document}

-
This is a real nice answer, if the adjustment is always to be of fixed width. Thanks! – Steven B. Segletes Jan 12 at 16:53
@cmhughes Can this work for other math environments like align? – EthanAlvaree Mar 29 at 19:24